From 486acdc633c498d4335711e30817cc70faacc487 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 16 Jun 2016 15:48:48 -0700 Subject: [PATCH 1/4] Squashed 'runtimes/' changes from 1ae4191..04af976 04af976 Regenerate azure & azure.fluent fecda5c Move RestClient into azure runtime 05105b4 Remove rest client from generic codegen 1773d49 Add stage for base url 4a7b25e Remove required mapper adapter 6196ce0 Merge pull request #20 from jianghaolu/master 06f30cf Checkstyle passes everywhere 2bf6b8b Merge pull request #783 from jianghaolu/javadocs b14cc72 Merge pull request #779 from jianghaolu/paramhostfix 546e068 Network passes checkstyle 14b071c Merge commit '4aa3dd4b847e747387475e9249c4aba97b6ef8ac' into paramhostfix 95fa032 Done storage usages git-subtree-dir: runtimes git-subtree-split: 04af9766d691bd19eb137f9f6cc27fab9c572cc0 --- .../com/microsoft/azure/AzureEnvironment.java | 11 +- .../microsoft/azure/AzureServiceClient.java | 49 ++- .../java/com/microsoft/azure/RestClient.java | 290 ++++++++++++++++++ .../java/com/microsoft/azure/DAGraphTest.java | 145 +++++++++ .../RequestIdHeaderInterceptorTests.java | 21 +- build-tools/src/main/resources/checkstyle.xml | 1 - .../src/main/resources/suppressions.xml | 4 +- .../java/com/microsoft/rest/RestClient.java | 245 --------------- .../com/microsoft/rest/ServiceClient.java | 68 +++- .../microsoft/rest/UserAgentInterceptor.java | 8 +- .../com/microsoft/rest/CredentialsTests.java | 51 ++- .../com/microsoft/rest/RetryHandlerTests.java | 23 +- .../microsoft/rest/ServiceClientTests.java | 9 +- .../com/microsoft/rest/UserAgentTests.java | 30 +- 14 files changed, 602 insertions(+), 353 deletions(-) create mode 100644 azure-client-runtime/src/main/java/com/microsoft/azure/RestClient.java create mode 100644 azure-client-runtime/src/test/java/com/microsoft/azure/DAGraphTest.java delete mode 100644 client-runtime/src/main/java/com/microsoft/rest/RestClient.java diff --git a/azure-client-runtime/src/main/java/com/microsoft/azure/AzureEnvironment.java b/azure-client-runtime/src/main/java/com/microsoft/azure/AzureEnvironment.java index 1721e2ff97bb..517a2c3205ac 100644 --- a/azure-client-runtime/src/main/java/com/microsoft/azure/AzureEnvironment.java +++ b/azure-client-runtime/src/main/java/com/microsoft/azure/AzureEnvironment.java @@ -7,9 +7,6 @@ package com.microsoft.azure; -import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; -import com.microsoft.rest.RestClient; - /** * An instance of this class describes an environment in Azure. */ @@ -87,10 +84,10 @@ public String getBaseUrl() { * * @return a builder for the rest client. */ - public RestClient.Builder newRestClientBuilder() { - return new RestClient.Builder(baseURL) - .withInterceptor(new RequestIdHeaderInterceptor()) - .withMapperAdapter(new AzureJacksonMapperAdapter()); + public RestClient.Builder.Buildable newRestClientBuilder() { + return new RestClient.Builder() + .withDefaultBaseUrl(this) + .withInterceptor(new RequestIdHeaderInterceptor()); } /** diff --git a/azure-client-runtime/src/main/java/com/microsoft/azure/AzureServiceClient.java b/azure-client-runtime/src/main/java/com/microsoft/azure/AzureServiceClient.java index 08094b67d507..09c8c28fbd53 100644 --- a/azure-client-runtime/src/main/java/com/microsoft/azure/AzureServiceClient.java +++ b/azure-client-runtime/src/main/java/com/microsoft/azure/AzureServiceClient.java @@ -7,18 +7,23 @@ package com.microsoft.azure; -import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; -import com.microsoft.rest.RestClient; -import com.microsoft.rest.ServiceClient; +import com.microsoft.rest.serializer.JacksonMapperAdapter; + +import okhttp3.OkHttpClient; +import retrofit2.Retrofit; /** * ServiceClient is the abstraction for accessing REST operations and their payload data types. */ -public abstract class AzureServiceClient extends ServiceClient { +public abstract class AzureServiceClient { + /** + * The RestClient instance storing all information needed for making REST calls. + */ + private RestClient restClient; + protected AzureServiceClient(String baseUrl) { - this(new RestClient.Builder(baseUrl) - .withInterceptor(new RequestIdHeaderInterceptor()) - .withMapperAdapter(new AzureJacksonMapperAdapter()).build()); + this(new RestClient.Builder().withBaseUrl(baseUrl) + .withInterceptor(new RequestIdHeaderInterceptor()).build()); } /** @@ -27,7 +32,7 @@ protected AzureServiceClient(String baseUrl) { * @param restClient the REST client */ protected AzureServiceClient(RestClient restClient) { - super(restClient); + this.restClient = restClient; } /** @@ -38,4 +43,32 @@ protected AzureServiceClient(RestClient restClient) { public String userAgent() { return "Azure-SDK-For-Java/" + getClass().getPackage().getImplementationVersion(); } + + /** + * @return the {@link RestClient} instance. + */ + public RestClient restClient() { + return restClient; + } + + /** + * @return the Retrofit instance. + */ + public Retrofit retrofit() { + return restClient().retrofit(); + } + + /** + * @return the HTTP client. + */ + public OkHttpClient httpClient() { + return restClient().httpClient(); + } + + /** + * @return the adapter to a Jackson {@link com.fasterxml.jackson.databind.ObjectMapper}. + */ + public JacksonMapperAdapter mapperAdapter() { + return restClient().mapperAdapter(); + } } diff --git a/azure-client-runtime/src/main/java/com/microsoft/azure/RestClient.java b/azure-client-runtime/src/main/java/com/microsoft/azure/RestClient.java new file mode 100644 index 000000000000..2517f890a52c --- /dev/null +++ b/azure-client-runtime/src/main/java/com/microsoft/azure/RestClient.java @@ -0,0 +1,290 @@ +/** + * + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + */ + +package com.microsoft.azure; + +import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; +import com.microsoft.rest.BaseUrlHandler; +import com.microsoft.rest.CustomHeadersInterceptor; +import com.microsoft.rest.UserAgentInterceptor; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.retry.RetryHandler; +import com.microsoft.rest.serializer.JacksonMapperAdapter; + +import java.lang.reflect.Field; +import java.net.CookieManager; +import java.net.CookiePolicy; + +import okhttp3.Interceptor; +import okhttp3.JavaNetCookieJar; +import okhttp3.OkHttpClient; +import okhttp3.logging.HttpLoggingInterceptor; +import retrofit2.Retrofit; + +/** + * An instance of this class stores the client information for making REST calls. + */ +public class RestClient { + /** The {@link okhttp3.OkHttpClient} object. */ + private OkHttpClient httpClient; + /** The {@link retrofit2.Retrofit} object. */ + private Retrofit retrofit; + /** The credentials to authenticate. */ + private ServiceClientCredentials credentials; + /** The interceptor to handle custom headers. */ + private CustomHeadersInterceptor customHeadersInterceptor; + /** The interceptor to handle base URL. */ + private BaseUrlHandler baseUrlHandler; + /** The adapter to a Jackson {@link com.fasterxml.jackson.databind.ObjectMapper}. */ + private JacksonMapperAdapter mapperAdapter; + /** The interceptor to set 'User-Agent' header. */ + private UserAgentInterceptor userAgentInterceptor; + + protected RestClient(OkHttpClient httpClient, + Retrofit retrofit, + ServiceClientCredentials credentials, + CustomHeadersInterceptor customHeadersInterceptor, + UserAgentInterceptor userAgentInterceptor, + BaseUrlHandler baseUrlHandler, + JacksonMapperAdapter mapperAdapter) { + this.httpClient = httpClient; + this.retrofit = retrofit; + this.credentials = credentials; + this.customHeadersInterceptor = customHeadersInterceptor; + this.userAgentInterceptor = userAgentInterceptor; + this.baseUrlHandler = baseUrlHandler; + this.mapperAdapter = mapperAdapter; + } + + /** + * Get the headers interceptor. + * + * @return the headers interceptor. + */ + public CustomHeadersInterceptor headers() { + return customHeadersInterceptor; + } + + /** + * Get the adapter to {@link com.fasterxml.jackson.databind.ObjectMapper}. + * + * @return the Jackson mapper adapter. + */ + public JacksonMapperAdapter mapperAdapter() { + return mapperAdapter; + } + + /** + * Sets the mapper adapter. + * + * @param mapperAdapter an adapter to a Jackson mapper. + * @return the builder itself for chaining. + */ + public RestClient withMapperAdapater(JacksonMapperAdapter mapperAdapter) { + this.mapperAdapter = mapperAdapter; + return this; + } + + /** + * Get the http client. + * + * @return the {@link OkHttpClient} object. + */ + public OkHttpClient httpClient() { + return httpClient; + } + + /** + * Get the retrofit instance. + * + * @return the {@link Retrofit} object. + */ + public Retrofit retrofit() { + return retrofit; + } + + /** + * Get the credentials attached to this REST client. + * + * @return the credentials. + */ + public ServiceClientCredentials credentials() { + return this.credentials; + } + + /** + * The builder class for building a REST client. + */ + public static class Builder { + /** The dynamic base URL with variables wrapped in "{" and "}". */ + protected String baseUrl; + /** The builder to build an {@link OkHttpClient}. */ + protected OkHttpClient.Builder httpClientBuilder; + /** The builder to build a {@link Retrofit}. */ + protected Retrofit.Builder retrofitBuilder; + /** The credentials to authenticate. */ + protected ServiceClientCredentials credentials; + /** The interceptor to handle custom headers. */ + protected CustomHeadersInterceptor customHeadersInterceptor; + /** The interceptor to handle base URL. */ + protected BaseUrlHandler baseUrlHandler; + /** The interceptor to set 'User-Agent' header. */ + protected UserAgentInterceptor userAgentInterceptor; + /** The inner Builder instance. */ + protected Buildable buildable; + + /** + * Creates an instance of the builder with a base URL to the service. + */ + public Builder() { + this(new OkHttpClient.Builder(), new Retrofit.Builder()); + } + + /** + * Creates an instance of the builder with a base URL and 2 custom builders. + * + * @param httpClientBuilder the builder to build an {@link OkHttpClient}. + * @param retrofitBuilder the builder to build a {@link Retrofit}. + */ + public Builder(OkHttpClient.Builder httpClientBuilder, Retrofit.Builder retrofitBuilder) { + if (httpClientBuilder == null) { + throw new IllegalArgumentException("httpClientBuilder == null"); + } + if (retrofitBuilder == null) { + throw new IllegalArgumentException("retrofitBuilder == null"); + } + CookieManager cookieManager = new CookieManager(); + cookieManager.setCookiePolicy(CookiePolicy.ACCEPT_ALL); + customHeadersInterceptor = new CustomHeadersInterceptor(); + baseUrlHandler = new BaseUrlHandler(); + userAgentInterceptor = new UserAgentInterceptor(); + // Set up OkHttp client + this.httpClientBuilder = httpClientBuilder + .cookieJar(new JavaNetCookieJar(cookieManager)) + .addInterceptor(userAgentInterceptor); + this.retrofitBuilder = retrofitBuilder; + this.buildable = new Buildable(); + } + + /** + * Sets the dynamic base URL. + * + * @param baseUrl the base URL to use. + * @return the builder itself for chaining. + */ + public Buildable withBaseUrl(String baseUrl) { + this.baseUrl = baseUrl; + return buildable; + } + + /** + * Sets the base URL with the default from the service client. + * + * @param serviceClientClass the service client class containing a default base URL. + * @return the builder itself for chaining. + */ + public Buildable withDefaultBaseUrl(Class serviceClientClass) { + try { + Field field = serviceClientClass.getDeclaredField("DEFAULT_BASE_URL"); + field.setAccessible(true); + baseUrl = (String) field.get(null); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new UnsupportedOperationException("Cannot read static field DEFAULT_BASE_URL", e); + } + return buildable; + } + + /** + * Sets the base URL with the default from the Azure Environment. + * + * @param environment the environment the application is running in + * @return the builder itself for chaining + */ + public RestClient.Builder.Buildable withDefaultBaseUrl(AzureEnvironment environment) { + withBaseUrl(environment.getBaseUrl()); + return buildable; + } + + /** + * The inner class from which a Rest Client can be built. + */ + public class Buildable { + /** + * Sets the user agent header. + * + * @param userAgent the user agent header. + * @return the builder itself for chaining. + */ + public Buildable withUserAgent(String userAgent) { + userAgentInterceptor.withUserAgent(userAgent); + return this; + } + + /** + * Sets the credentials. + * + * @param credentials the credentials object. + * @return the builder itself for chaining. + */ + public Buildable withCredentials(ServiceClientCredentials credentials) { + Builder.this.credentials = credentials; + if (credentials != null) { + credentials.applyCredentialsFilter(httpClientBuilder); + } + return this; + } + + /** + * Sets the log level. + * + * @param logLevel the {@link okhttp3.logging.HttpLoggingInterceptor.Level} enum. + * @return the builder itself for chaining. + */ + public Buildable withLogLevel(HttpLoggingInterceptor.Level logLevel) { + httpClientBuilder.addInterceptor(new HttpLoggingInterceptor().setLevel(logLevel)); + return this; + } + + /** + * Add an interceptor the Http client pipeline. + * + * @param interceptor the interceptor to add. + * @return the builder itself for chaining. + */ + public Buildable withInterceptor(Interceptor interceptor) { + httpClientBuilder.addInterceptor(interceptor); + return this; + } + + /** + * Build a RestClient with all the current configurations. + * + * @return a {@link RestClient}. + */ + public RestClient build() { + AzureJacksonMapperAdapter mapperAdapter = new AzureJacksonMapperAdapter(); + OkHttpClient httpClient = httpClientBuilder + .addInterceptor(baseUrlHandler) + .addInterceptor(customHeadersInterceptor) + .addInterceptor(new RetryHandler()) + .build(); + return new RestClient(httpClient, + retrofitBuilder + .baseUrl(baseUrl) + .client(httpClient) + .addConverterFactory(mapperAdapter.getConverterFactory()) + .build(), + credentials, + customHeadersInterceptor, + userAgentInterceptor, + baseUrlHandler, + mapperAdapter); + } + + } + } +} diff --git a/azure-client-runtime/src/test/java/com/microsoft/azure/DAGraphTest.java b/azure-client-runtime/src/test/java/com/microsoft/azure/DAGraphTest.java new file mode 100644 index 000000000000..8c1e12dd7011 --- /dev/null +++ b/azure-client-runtime/src/test/java/com/microsoft/azure/DAGraphTest.java @@ -0,0 +1,145 @@ +package com.microsoft.azure; + +import org.junit.Assert; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; + +public class DAGraphTest { + @Test + public void testDAGraphGetNext() { + /** + * |-------->[D]------>[B]-----------[A] + * | ^ ^ + * | | | + * [F]------->[E]-------| | + * | | | + * | |------->[G]----->[C]---- + * | + * |-------->[H]-------------------->[I] + */ + List expectedOrder = new ArrayList<>(); + expectedOrder.add("A"); expectedOrder.add("I"); + expectedOrder.add("B"); expectedOrder.add("C"); expectedOrder.add("H"); + expectedOrder.add("D"); expectedOrder.add("G"); + expectedOrder.add("E"); + expectedOrder.add("F"); + + DAGNode nodeA = new DAGNode<>("A", "dataA"); + DAGNode nodeI = new DAGNode<>("I", "dataI"); + + DAGNode nodeB = new DAGNode<>("B", "dataB"); + nodeB.addDependency(nodeA.key()); + + DAGNode nodeC = new DAGNode<>("C", "dataC"); + nodeC.addDependency(nodeA.key()); + + DAGNode nodeH = new DAGNode<>("H", "dataH"); + nodeH.addDependency(nodeI.key()); + + DAGNode nodeG = new DAGNode<>("G", "dataG"); + nodeG.addDependency(nodeC.key()); + + DAGNode nodeE = new DAGNode<>("E", "dataE"); + nodeE.addDependency(nodeB.key()); + nodeE.addDependency(nodeG.key()); + + DAGNode nodeD = new DAGNode<>("D", "dataD"); + nodeD.addDependency(nodeB.key()); + + + DAGNode nodeF = new DAGNode<>("F", "dataF"); + nodeF.addDependency(nodeD.key()); + nodeF.addDependency(nodeE.key()); + nodeF.addDependency(nodeH.key()); + + DAGraph> dag = new DAGraph<>(nodeF); + dag.addNode(nodeA); + dag.addNode(nodeB); + dag.addNode(nodeC); + dag.addNode(nodeD); + dag.addNode(nodeE); + dag.addNode(nodeG); + dag.addNode(nodeH); + dag.addNode(nodeI); + + dag.populateDependentKeys(); + DAGNode nextNode = dag.getNext(); + int i = 0; + while (nextNode != null) { + Assert.assertEquals(nextNode.key(), expectedOrder.get(i)); + dag.reportedCompleted(nextNode); + nextNode = dag.getNext(); + i++; + } + + System.out.println("done"); + } + + @Test + public void testGraphMerge() { + /** + * |-------->[D]------>[B]-----------[A] + * | ^ ^ + * | | | + * [F]------->[E]-------| | + * | | | + * | |------->[G]----->[C]---- + * | + * |-------->[H]-------------------->[I] + */ + List expectedOrder = new ArrayList<>(); + expectedOrder.add("A"); expectedOrder.add("I"); + expectedOrder.add("B"); expectedOrder.add("C"); expectedOrder.add("H"); + expectedOrder.add("D"); expectedOrder.add("G"); + expectedOrder.add("E"); + expectedOrder.add("F"); + + DAGraph> graphA = createGraph("A"); + DAGraph> graphI = createGraph("I"); + + DAGraph> graphB = createGraph("B"); + graphA.merge(graphB); + + DAGraph> graphC = createGraph("C"); + graphA.merge(graphC); + + DAGraph> graphH = createGraph("H"); + graphI.merge(graphH); + + DAGraph> graphG = createGraph("G"); + graphC.merge(graphG); + + DAGraph> graphE = createGraph("E"); + graphB.merge(graphE); + graphG.merge(graphE); + + DAGraph> graphD = createGraph("D"); + graphB.merge(graphD); + + DAGraph> graphF = createGraph("F"); + graphD.merge(graphF); + graphE.merge(graphF); + graphH.merge(graphF); + + DAGraph> dag = graphF; + dag.prepare(); + + DAGNode nextNode = dag.getNext(); + int i = 0; + while (nextNode != null) { + Assert.assertEquals(expectedOrder.get(i), nextNode.key()); + // Process the node + dag.reportedCompleted(nextNode); + nextNode = dag.getNext(); + i++; + } + } + + private DAGraph> createGraph(String resourceName) { + DAGNode node = new DAGNode<>(resourceName, "data" + resourceName); + DAGraph> graph = new DAGraph<>(node); + return graph; + } +} diff --git a/azure-client-runtime/src/test/java/com/microsoft/azure/RequestIdHeaderInterceptorTests.java b/azure-client-runtime/src/test/java/com/microsoft/azure/RequestIdHeaderInterceptorTests.java index e8cce598b05f..060336cd23d2 100644 --- a/azure-client-runtime/src/test/java/com/microsoft/azure/RequestIdHeaderInterceptorTests.java +++ b/azure-client-runtime/src/test/java/com/microsoft/azure/RequestIdHeaderInterceptorTests.java @@ -7,24 +7,25 @@ package com.microsoft.azure; -import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; -import com.microsoft.rest.RestClient; import com.microsoft.rest.retry.RetryHandler; -import okhttp3.Interceptor; -import okhttp3.Protocol; -import okhttp3.Request; -import okhttp3.Response; + import org.junit.Assert; import org.junit.Test; import java.io.IOException; +import okhttp3.Interceptor; +import okhttp3.Protocol; +import okhttp3.Request; +import okhttp3.Response; + public class RequestIdHeaderInterceptorTests { private static final String REQUEST_ID_HEADER = "x-ms-client-request-id"; @Test public void newRequestIdForEachCall() throws Exception { - RestClient restClient = new RestClient.Builder("http://localhost") + RestClient restClient = new RestClient.Builder() + .withBaseUrl("http://localhost") .withInterceptor(new RequestIdHeaderInterceptor()) .withInterceptor(new Interceptor() { private String firstRequestId = null; @@ -45,7 +46,6 @@ public Response intercept(Chain chain) throws IOException { .protocol(Protocol.HTTP_1_1).build(); } }) - .withMapperAdapter(new AzureJacksonMapperAdapter()) .build(); AzureServiceClient serviceClient = new AzureServiceClient(restClient) { }; Response response = serviceClient.restClient().httpClient() @@ -58,11 +58,13 @@ public Response intercept(Chain chain) throws IOException { @Test public void sameRequestIdForRetry() throws Exception { - RestClient restClient = new RestClient.Builder("http://localhost") + RestClient restClient = new RestClient.Builder() + .withBaseUrl("http://localhost") .withInterceptor(new RequestIdHeaderInterceptor()) .withInterceptor(new RetryHandler()) .withInterceptor(new Interceptor() { private String firstRequestId = null; + @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); @@ -80,7 +82,6 @@ public Response intercept(Chain chain) throws IOException { .protocol(Protocol.HTTP_1_1).build(); } }) - .withMapperAdapter(new AzureJacksonMapperAdapter()) .build(); AzureServiceClient serviceClient = new AzureServiceClient(restClient) { }; Response response = serviceClient.restClient().httpClient() diff --git a/build-tools/src/main/resources/checkstyle.xml b/build-tools/src/main/resources/checkstyle.xml index d156ff63e65f..1875d6f100ca 100644 --- a/build-tools/src/main/resources/checkstyle.xml +++ b/build-tools/src/main/resources/checkstyle.xml @@ -248,7 +248,6 @@ --> - diff --git a/build-tools/src/main/resources/suppressions.xml b/build-tools/src/main/resources/suppressions.xml index 690bb7a9fc35..29e5bd66eefb 100644 --- a/build-tools/src/main/resources/suppressions.xml +++ b/build-tools/src/main/resources/suppressions.xml @@ -31,6 +31,8 @@ --> - + + + \ No newline at end of file diff --git a/client-runtime/src/main/java/com/microsoft/rest/RestClient.java b/client-runtime/src/main/java/com/microsoft/rest/RestClient.java deleted file mode 100644 index 254639642345..000000000000 --- a/client-runtime/src/main/java/com/microsoft/rest/RestClient.java +++ /dev/null @@ -1,245 +0,0 @@ -/** - * - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - */ - -package com.microsoft.rest; - -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.retry.RetryHandler; -import com.microsoft.rest.serializer.JacksonMapperAdapter; - -import java.net.CookieManager; -import java.net.CookiePolicy; - -import okhttp3.Interceptor; -import okhttp3.JavaNetCookieJar; -import okhttp3.OkHttpClient; -import okhttp3.logging.HttpLoggingInterceptor; -import retrofit2.Retrofit; - -/** - * An instance of this class stores the client information for making REST calls. - */ -public final class RestClient { - /** The {@link okhttp3.OkHttpClient} object. */ - private OkHttpClient httpClient; - /** The {@link retrofit2.Retrofit} object. */ - private Retrofit retrofit; - /** The credentials to authenticate. */ - private ServiceClientCredentials credentials; - /** The interceptor to handle custom headers. */ - private CustomHeadersInterceptor customHeadersInterceptor; - /** The interceptor to handle base URL. */ - private BaseUrlHandler baseUrlHandler; - /** The adapter to a Jackson {@link com.fasterxml.jackson.databind.ObjectMapper}. */ - private JacksonMapperAdapter mapperAdapter; - /** The interceptor to set 'User-Agent' header. */ - private UserAgentInterceptor userAgentInterceptor; - - private RestClient(OkHttpClient httpClient, - Retrofit retrofit, - ServiceClientCredentials credentials, - CustomHeadersInterceptor customHeadersInterceptor, - UserAgentInterceptor userAgentInterceptor, - BaseUrlHandler baseUrlHandler, - JacksonMapperAdapter mapperAdapter) { - this.httpClient = httpClient; - this.retrofit = retrofit; - this.credentials = credentials; - this.customHeadersInterceptor = customHeadersInterceptor; - this.userAgentInterceptor = userAgentInterceptor; - this.baseUrlHandler = baseUrlHandler; - this.mapperAdapter = mapperAdapter; - } - - /** - * Get the headers interceptor. - * - * @return the headers interceptor. - */ - public CustomHeadersInterceptor headers() { - return customHeadersInterceptor; - } - - /** - * Get the adapter to {@link com.fasterxml.jackson.databind.ObjectMapper}. - * - * @return the Jackson mapper adapter. - */ - public JacksonMapperAdapter mapperAdapter() { - return mapperAdapter; - } - - /** - * Get the http client. - * - * @return the {@link OkHttpClient} object. - */ - public OkHttpClient httpClient() { - return httpClient; - } - - /** - * Get the retrofit instance. - * - * @return the {@link Retrofit} object. - */ - public Retrofit retrofit() { - return retrofit; - } - - /** - * Get the credentials attached to this REST client. - * - * @return the credentials. - */ - public ServiceClientCredentials credentials() { - return this.credentials; - } - - /** - * The builder class for building a REST client. - */ - public static class Builder { - /** The builder to build an {@link OkHttpClient}. */ - private OkHttpClient.Builder httpClientBuilder; - /** The builder to build a {@link Retrofit}. */ - private Retrofit.Builder retrofitBuilder; - /** The credentials to authenticate. */ - private ServiceClientCredentials credentials; - /** The interceptor to handle custom headers. */ - private CustomHeadersInterceptor customHeadersInterceptor; - /** The interceptor to handle base URL. */ - private BaseUrlHandler baseUrlHandler; - /** The adapter to a Jackson {@link com.fasterxml.jackson.databind.ObjectMapper}. */ - private JacksonMapperAdapter mapperAdapter; - /** The interceptor to set 'User-Agent' header. */ - private UserAgentInterceptor userAgentInterceptor; - - /** - * Creates an instance of the builder with a base URL to the service. - * - * @param baseUrl the dynamic base URL with variables wrapped in "{" and "}". - */ - public Builder(String baseUrl) { - this(baseUrl, new OkHttpClient.Builder(), new Retrofit.Builder()); - } - - /** - * Creates an instance of the builder with a base URL and 2 custom builders. - * - * @param baseUrl the dynamic base URL with variables wrapped in "{" and "}". - * @param httpClientBuilder the builder to build an {@link OkHttpClient}. - * @param retrofitBuilder the builder to build a {@link Retrofit}. - */ - public Builder(String baseUrl, OkHttpClient.Builder httpClientBuilder, Retrofit.Builder retrofitBuilder) { - if (baseUrl == null) { - throw new IllegalArgumentException("baseUrl == null"); - } - if (httpClientBuilder == null) { - throw new IllegalArgumentException("httpClientBuilder == null"); - } - if (retrofitBuilder == null) { - throw new IllegalArgumentException("retrofitBuilder == null"); - } - CookieManager cookieManager = new CookieManager(); - cookieManager.setCookiePolicy(CookiePolicy.ACCEPT_ALL); - customHeadersInterceptor = new CustomHeadersInterceptor(); - baseUrlHandler = new BaseUrlHandler(); - userAgentInterceptor = new UserAgentInterceptor(); - // Set up OkHttp client - this.httpClientBuilder = httpClientBuilder - .cookieJar(new JavaNetCookieJar(cookieManager)) - .addInterceptor(userAgentInterceptor); - // Set up rest adapter - this.retrofitBuilder = retrofitBuilder.baseUrl(baseUrl); - } - - /** - * Sets the user agent header. - * - * @param userAgent the user agent header. - * @return the builder itself for chaining. - */ - public Builder withUserAgent(String userAgent) { - this.userAgentInterceptor.setUserAgent(userAgent); - return this; - } - - /** - * Sets the mapper adapter. - * - * @param mapperAdapter an adapter to a Jackson mapper. - * @return the builder itself for chaining. - */ - public Builder withMapperAdapter(JacksonMapperAdapter mapperAdapter) { - this.mapperAdapter = mapperAdapter; - return this; - } - - /** - * Sets the credentials. - * - * @param credentials the credentials object. - * @return the builder itself for chaining. - */ - public Builder withCredentials(ServiceClientCredentials credentials) { - this.credentials = credentials; - if (credentials != null) { - credentials.applyCredentialsFilter(httpClientBuilder); - } - return this; - } - - /** - * Sets the log level. - * - * @param logLevel the {@link okhttp3.logging.HttpLoggingInterceptor.Level} enum. - * @return the builder itself for chaining. - */ - public Builder withLogLevel(HttpLoggingInterceptor.Level logLevel) { - this.httpClientBuilder.addInterceptor(new HttpLoggingInterceptor().setLevel(logLevel)); - return this; - } - - /** - * Add an interceptor the Http client pipeline. - * - * @param interceptor the interceptor to add. - * @return the builder itself for chaining. - */ - public Builder withInterceptor(Interceptor interceptor) { - this.httpClientBuilder.addInterceptor(interceptor); - return this; - } - - /** - * Build a RestClient with all the current configurations. - * - * @return a {@link RestClient}. - */ - public RestClient build() { - if (mapperAdapter == null) { - throw new IllegalArgumentException("Please set mapper adapter."); - } - OkHttpClient httpClient = httpClientBuilder - .addInterceptor(baseUrlHandler) - .addInterceptor(customHeadersInterceptor) - .addInterceptor(new RetryHandler()) - .build(); - return new RestClient(httpClient, - retrofitBuilder - .client(httpClient) - .addConverterFactory(mapperAdapter.getConverterFactory()) - .build(), - credentials, - customHeadersInterceptor, - userAgentInterceptor, - baseUrlHandler, - mapperAdapter); - } - } -} diff --git a/client-runtime/src/main/java/com/microsoft/rest/ServiceClient.java b/client-runtime/src/main/java/com/microsoft/rest/ServiceClient.java index 674b6a1bc625..8311a243de13 100644 --- a/client-runtime/src/main/java/com/microsoft/rest/ServiceClient.java +++ b/client-runtime/src/main/java/com/microsoft/rest/ServiceClient.java @@ -7,16 +7,26 @@ package com.microsoft.rest; +import com.microsoft.rest.retry.RetryHandler; import com.microsoft.rest.serializer.JacksonMapperAdapter; +import java.net.CookieManager; +import java.net.CookiePolicy; + +import okhttp3.JavaNetCookieJar; +import okhttp3.OkHttpClient; +import retrofit2.Retrofit; + /** * ServiceClient is the abstraction for accessing REST operations and their payload data types. */ public abstract class ServiceClient { - /** - * The builder for building the OkHttp client. - */ - private RestClient restClient; + /** The HTTP client. */ + private OkHttpClient httpClient; + /** The Retrofit instance. */ + private Retrofit retrofit; + /** The adapter to a Jackson {@link com.fasterxml.jackson.databind.ObjectMapper}. */ + private JacksonMapperAdapter mapperAdapter; /** * Initializes a new instance of the ServiceClient class. @@ -24,27 +34,55 @@ public abstract class ServiceClient { * @param baseUrl the service endpoint */ protected ServiceClient(String baseUrl) { - this(new RestClient.Builder(baseUrl) - .withMapperAdapter(new JacksonMapperAdapter()).build()); + this(baseUrl, new OkHttpClient.Builder(), new Retrofit.Builder()); } /** * Initializes a new instance of the ServiceClient class. * - * @param restClient the builder to build up an REST client */ - protected ServiceClient(RestClient restClient) { - if (restClient == null) { - throw new IllegalArgumentException("restClient == null"); + protected ServiceClient(String baseUrl, OkHttpClient.Builder clientBuilder, Retrofit.Builder restBuilder) { + if (clientBuilder == null) { + throw new IllegalArgumentException("clientBuilder == null"); } - this.restClient = restClient; + if (restBuilder == null) { + throw new IllegalArgumentException("restBuilder == null"); + } + this.mapperAdapter = new JacksonMapperAdapter(); + CookieManager cookieManager = new CookieManager(); + cookieManager.setCookiePolicy(CookiePolicy.ACCEPT_ALL); + this.httpClient = clientBuilder + .cookieJar(new JavaNetCookieJar(cookieManager)) + .addInterceptor(new UserAgentInterceptor()) + .addInterceptor(new BaseUrlHandler()) + .addInterceptor(new CustomHeadersInterceptor()) + .addInterceptor(new RetryHandler()) + .build(); + this.retrofit = restBuilder + .baseUrl(baseUrl) + .client(httpClient) + .addConverterFactory(mapperAdapter.getConverterFactory()) + .build(); + } + + /** + * @return the Retrofit instance. + */ + public Retrofit retrofit() { + return this.retrofit; + } + + /** + * @return the HTTP client. + */ + public OkHttpClient httpClient() { + return this.httpClient; } /** - * Get the list of interceptors the OkHttp client will execute. - * @return the list of interceptors + * @return the adapter to a Jackson {@link com.fasterxml.jackson.databind.ObjectMapper}. */ - public RestClient restClient() { - return this.restClient; + public JacksonMapperAdapter mapperAdapter() { + return this.mapperAdapter; } } diff --git a/client-runtime/src/main/java/com/microsoft/rest/UserAgentInterceptor.java b/client-runtime/src/main/java/com/microsoft/rest/UserAgentInterceptor.java index ac4a5ec5a73c..7b822078d79a 100644 --- a/client-runtime/src/main/java/com/microsoft/rest/UserAgentInterceptor.java +++ b/client-runtime/src/main/java/com/microsoft/rest/UserAgentInterceptor.java @@ -39,18 +39,22 @@ public UserAgentInterceptor() { * Overwrite the User-Agent header. * * @param userAgent the new user agent value. + * @return the user agent interceptor itself */ - public void setUserAgent(String userAgent) { + public UserAgentInterceptor withUserAgent(String userAgent) { this.userAgent = userAgent; + return this; } /** * Append a text to the User-Agent header. * * @param userAgent the user agent value to append. + * @return the user agent interceptor itself */ - public void appendUserAgent(String userAgent) { + public UserAgentInterceptor appendUserAgent(String userAgent) { this.userAgent += " " + userAgent; + return this; } @Override diff --git a/client-runtime/src/test/java/com/microsoft/rest/CredentialsTests.java b/client-runtime/src/test/java/com/microsoft/rest/CredentialsTests.java index 3e05c5d723fd..d21de3ef9bd1 100644 --- a/client-runtime/src/test/java/com/microsoft/rest/CredentialsTests.java +++ b/client-runtime/src/test/java/com/microsoft/rest/CredentialsTests.java @@ -9,7 +9,6 @@ import com.microsoft.rest.credentials.BasicAuthenticationCredentials; import com.microsoft.rest.credentials.TokenCredentials; -import com.microsoft.rest.serializer.JacksonMapperAdapter; import org.junit.Assert; import org.junit.Test; @@ -26,38 +25,34 @@ public class CredentialsTests { @Test public void basicCredentialsTest() throws Exception { - OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder(); - Retrofit.Builder retrofitBuilder = new Retrofit.Builder(); BasicAuthenticationCredentials credentials = new BasicAuthenticationCredentials("user", "pass"); - RestClient.Builder restBuilder = new RestClient.Builder("http://localhost", clientBuilder, retrofitBuilder) - .withMapperAdapter(new JacksonMapperAdapter()) - .withCredentials(credentials) - .withInterceptor(new Interceptor() { - @Override - public Response intercept(Chain chain) throws IOException { - String header = chain.request().header("Authorization"); - Assert.assertEquals("Basic dXNlcjpwYXNz", header); - return new Response.Builder() - .request(chain.request()) - .code(200) - .protocol(Protocol.HTTP_1_1) - .build(); - } - }); - ServiceClient serviceClient = new ServiceClient(restBuilder.build()) { }; - Response response = serviceClient.restClient().httpClient().newCall(new Request.Builder().url("http://localhost").build()).execute(); + OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder(); + credentials.applyCredentialsFilter(clientBuilder); + clientBuilder.addInterceptor( + new Interceptor() { + @Override + public Response intercept(Chain chain) throws IOException { + String header = chain.request().header("Authorization"); + Assert.assertEquals("Basic dXNlcjpwYXNz", header); + return new Response.Builder() + .request(chain.request()) + .code(200) + .protocol(Protocol.HTTP_1_1) + .build(); + } + }); + ServiceClient serviceClient = new ServiceClient("http://localhost", clientBuilder, new Retrofit.Builder()) { }; + Response response = serviceClient.httpClient().newCall(new Request.Builder().url("http://localhost").build()).execute(); Assert.assertEquals(200, response.code()); } @Test public void tokenCredentialsTest() throws Exception { - OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder(); - Retrofit.Builder retrofitBuilder = new Retrofit.Builder(); TokenCredentials credentials = new TokenCredentials(null, "this_is_a_token"); - RestClient.Builder restBuilder = new RestClient.Builder("http://localhost", clientBuilder, retrofitBuilder) - .withMapperAdapter(new JacksonMapperAdapter()) - .withCredentials(credentials) - .withInterceptor(new Interceptor() { + OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder(); + credentials.applyCredentialsFilter(clientBuilder); + clientBuilder.addInterceptor( + new Interceptor() { @Override public Response intercept(Chain chain) throws IOException { String header = chain.request().header("Authorization"); @@ -69,8 +64,8 @@ public Response intercept(Chain chain) throws IOException { .build(); } }); - ServiceClient serviceClient = new ServiceClient(restBuilder.build()) { }; - Response response = serviceClient.restClient().httpClient().newCall(new Request.Builder().url("http://localhost").build()).execute(); + ServiceClient serviceClient = new ServiceClient("http://localhost", clientBuilder, new Retrofit.Builder()) { }; + Response response = serviceClient.httpClient().newCall(new Request.Builder().url("http://localhost").build()).execute(); Assert.assertEquals(200, response.code()); } } diff --git a/client-runtime/src/test/java/com/microsoft/rest/RetryHandlerTests.java b/client-runtime/src/test/java/com/microsoft/rest/RetryHandlerTests.java index 97c46f6fe4fc..068e57b21432 100644 --- a/client-runtime/src/test/java/com/microsoft/rest/RetryHandlerTests.java +++ b/client-runtime/src/test/java/com/microsoft/rest/RetryHandlerTests.java @@ -9,7 +9,11 @@ import com.microsoft.rest.retry.RetryHandler; -import com.microsoft.rest.serializer.JacksonMapperAdapter; +import org.junit.Assert; +import org.junit.Test; + +import java.io.IOException; + import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.Protocol; @@ -17,11 +21,6 @@ import okhttp3.Response; import retrofit2.Retrofit; -import org.junit.Assert; -import org.junit.Test; - -import java.io.IOException; - public class RetryHandlerTests { @Test public void exponentialRetryEndOn501() throws Exception { @@ -42,10 +41,8 @@ public Response intercept(Chain chain) throws IOException { .build(); } }); - RestClient.Builder restBuilder = new RestClient.Builder("http://localhost", clientBuilder, retrofitBuilder) - .withMapperAdapter(new JacksonMapperAdapter()); - ServiceClient serviceClient = new ServiceClient(restBuilder.build()) { }; - Response response = serviceClient.restClient().httpClient().newCall( + ServiceClient serviceClient = new ServiceClient("http://localhost", clientBuilder, retrofitBuilder) { }; + Response response = serviceClient.httpClient().newCall( new Request.Builder().url("http://localhost").get().build()).execute(); Assert.assertEquals(501, response.code()); } @@ -69,10 +66,8 @@ public Response intercept(Chain chain) throws IOException { .build(); } }); - RestClient.Builder restBuilder = new RestClient.Builder("http://localhost", clientBuilder, retrofitBuilder) - .withMapperAdapter(new JacksonMapperAdapter()); - ServiceClient serviceClient = new ServiceClient(restBuilder.build()) { }; - Response response = serviceClient.restClient().httpClient().newCall( + ServiceClient serviceClient = new ServiceClient("http://localhost", clientBuilder, retrofitBuilder) { }; + Response response = serviceClient.httpClient().newCall( new Request.Builder().url("http://localhost").get().build()).execute(); Assert.assertEquals(500, response.code()); } diff --git a/client-runtime/src/test/java/com/microsoft/rest/ServiceClientTests.java b/client-runtime/src/test/java/com/microsoft/rest/ServiceClientTests.java index 6423ef23d808..9d76292d20a0 100644 --- a/client-runtime/src/test/java/com/microsoft/rest/ServiceClientTests.java +++ b/client-runtime/src/test/java/com/microsoft/rest/ServiceClientTests.java @@ -7,10 +7,8 @@ package com.microsoft.rest; -import com.microsoft.rest.serializer.JacksonMapperAdapter; import org.junit.Assert; import org.junit.Test; -import retrofit2.Retrofit; import java.io.IOException; @@ -19,6 +17,7 @@ import okhttp3.Protocol; import okhttp3.Request; import okhttp3.Response; +import retrofit2.Retrofit; public class ServiceClientTests { @Test @@ -39,10 +38,8 @@ public Response intercept(Chain chain) throws IOException { .build(); } }); - RestClient.Builder restBuilder = new RestClient.Builder("http://localhost", clientBuilder, retrofitBuilder) - .withMapperAdapter(new JacksonMapperAdapter()); - ServiceClient serviceClient = new ServiceClient(restBuilder.build()) { }; - Response response = serviceClient.restClient().httpClient().newCall(new Request.Builder().url("http://localhost").build()).execute(); + ServiceClient serviceClient = new ServiceClient("http://localhost", clientBuilder, retrofitBuilder) { }; + Response response = serviceClient.httpClient().newCall(new Request.Builder().url("http://localhost").build()).execute(); Assert.assertEquals(200, response.code()); } diff --git a/client-runtime/src/test/java/com/microsoft/rest/UserAgentTests.java b/client-runtime/src/test/java/com/microsoft/rest/UserAgentTests.java index 35970714e3a8..9aa60e5b2631 100644 --- a/client-runtime/src/test/java/com/microsoft/rest/UserAgentTests.java +++ b/client-runtime/src/test/java/com/microsoft/rest/UserAgentTests.java @@ -7,23 +7,24 @@ package com.microsoft.rest; -import com.microsoft.rest.serializer.JacksonMapperAdapter; - import org.junit.Assert; import org.junit.Test; import java.io.IOException; import okhttp3.Interceptor; +import okhttp3.OkHttpClient; import okhttp3.Protocol; import okhttp3.Request; import okhttp3.Response; +import retrofit2.Retrofit; public class UserAgentTests { @Test public void defaultUserAgentTests() throws Exception { - RestClient.Builder restBuilder = new RestClient.Builder("http://localhost") - .withInterceptor(new Interceptor() { + OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder() + .addInterceptor(new UserAgentInterceptor()) + .addInterceptor(new Interceptor() { @Override public Response intercept(Chain chain) throws IOException { String header = chain.request().header("User-Agent"); @@ -34,20 +35,18 @@ public Response intercept(Chain chain) throws IOException { .protocol(Protocol.HTTP_1_1) .build(); } - }) - .withMapperAdapter(new JacksonMapperAdapter()); - ServiceClient serviceClient = new ServiceClient(restBuilder.build()) { }; - Response response = serviceClient.restClient().httpClient() + }); + ServiceClient serviceClient = new ServiceClient("http://localhost", clientBuilder, new Retrofit.Builder()) { }; + Response response = serviceClient.httpClient() .newCall(new Request.Builder().get().url("http://localhost").build()).execute(); Assert.assertEquals(200, response.code()); } @Test public void customUserAgentTests() throws Exception { - - RestClient.Builder restBuilder = new RestClient.Builder("http://localhost") - .withUserAgent("Awesome") - .withInterceptor(new Interceptor() { + OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder() + .addInterceptor(new UserAgentInterceptor().withUserAgent("Awesome")) + .addInterceptor(new Interceptor() { @Override public Response intercept(Chain chain) throws IOException { String header = chain.request().header("User-Agent"); @@ -58,10 +57,9 @@ public Response intercept(Chain chain) throws IOException { .protocol(Protocol.HTTP_1_1) .build(); } - }) - .withMapperAdapter(new JacksonMapperAdapter()); - ServiceClient serviceClient = new ServiceClient(restBuilder.build()) { }; - Response response = serviceClient.restClient().httpClient() + }); + ServiceClient serviceClient = new ServiceClient("http://localhost", clientBuilder, new Retrofit.Builder()) { }; + Response response = serviceClient.httpClient() .newCall(new Request.Builder().get().url("http://localhost").build()).execute(); Assert.assertEquals(200, response.code()); } From 218cff3e390b342c2fde4686c7e2028815d5e370 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 16 Jun 2016 16:11:35 -0700 Subject: [PATCH 2/4] Apply RestClient improvements and regenerate --- .../batch/protocol/BatchServiceClient.java | 11 +- .../protocol/implementation/AccountsImpl.java | 9 +- .../implementation/ApplicationsImpl.java | 11 +- .../BatchServiceClientImpl.java | 19 +- .../implementation/CertificatesImpl.java | 17 +- .../implementation/ComputeNodesImpl.java | 29 +- .../protocol/implementation/FilesImpl.java | 25 +- .../implementation/JobSchedulesImpl.java | 27 +- .../protocol/implementation/JobsImpl.java | 35 +- .../protocol/implementation/PoolsImpl.java | 41 +- .../protocol/implementation/TasksImpl.java | 24 +- .../implementation/ComputeManager.java | 2 +- .../api/AvailabilitySetsInner.java | 10 +- .../api/ComputeManagementClientImpl.java | 23 +- .../implementation/api/UsagesInner.java | 4 +- .../VirtualMachineExtensionImagesInner.java | 6 +- .../api/VirtualMachineExtensionsInner.java | 6 +- .../api/VirtualMachineImagesInner.java | 10 +- .../api/VirtualMachineScaleSetVMsInner.java | 20 +- .../api/VirtualMachineScaleSetsInner.java | 47 +- .../api/VirtualMachineSizesInner.java | 2 +- .../api/VirtualMachinesInner.java | 28 +- .../compute/ComputeManagementTestBase.java | 4 +- .../datalake/analytics/Catalogs.java | 113 ++++ ...aLakeAnalyticsAccountManagementClient.java | 2 +- ...aLakeAnalyticsCatalogManagementClient.java | 2 +- .../DataLakeAnalyticsJobManagementClient.java | 2 +- .../implementation/AccountsImpl.java | 53 +- .../implementation/CatalogsImpl.java | 486 ++++++++++++++++-- ...eAnalyticsAccountManagementClientImpl.java | 7 +- ...eAnalyticsCatalogManagementClientImpl.java | 7 +- ...aLakeAnalyticsJobManagementClientImpl.java | 7 +- .../analytics/implementation/JobsImpl.java | 21 +- .../implementation/package-info.java | 4 +- .../analytics/models/TypeFieldInfo.java | 64 +++ .../datalake/analytics/models/USqlTable.java | 25 + .../analytics/models/USqlTableType.java | 39 ++ .../analytics/models/package-info.java | 4 +- .../datalake/analytics/package-info.java | 4 +- .../DataLakeAnalyticsManagementTestBase.java | 13 +- .../uploader/DataLakeUploaderTestBase.java | 7 +- .../DataLakeStoreAccountManagementClient.java | 2 +- ...taLakeStoreFileSystemManagementClient.java | 2 +- .../store/implementation/AccountsImpl.java | 31 +- ...aLakeStoreAccountManagementClientImpl.java | 7 +- ...keStoreFileSystemManagementClientImpl.java | 7 +- .../store/implementation/FileSystemsImpl.java | 47 +- .../DataLakeStoreManagementTestBase.java | 7 +- .../implementation/NetworkManager.java | 2 +- .../api/ApplicationGatewaysInner.java | 18 +- ...xpressRouteCircuitAuthorizationsInner.java | 10 +- .../api/ExpressRouteCircuitPeeringsInner.java | 10 +- .../api/ExpressRouteCircuitsInner.java | 26 +- .../ExpressRouteServiceProvidersInner.java | 4 +- .../api/LoadBalancersInner.java | 14 +- .../api/LocalNetworkGatewaysInner.java | 10 +- .../api/NetworkInterfacesInner.java | 24 +- .../api/NetworkManagementClientImpl.java | 25 +- .../api/NetworkSecurityGroupsInner.java | 14 +- .../api/PublicIPAddressesInner.java | 14 +- .../implementation/api/RouteTablesInner.java | 14 +- .../implementation/api/RoutesInner.java | 10 +- .../api/SecurityRulesInner.java | 10 +- .../implementation/api/SubnetsInner.java | 10 +- .../implementation/api/UsagesInner.java | 4 +- ...VirtualNetworkGatewayConnectionsInner.java | 16 +- .../api/VirtualNetworkGatewaysInner.java | 14 +- .../api/VirtualNetworksInner.java | 14 +- .../resources/ResourceConnector.java | 2 +- .../implementation/AzureConfigurableImpl.java | 4 +- .../arm/implementation/Manager.java | 2 +- .../implementation/ResourceManager.java | 2 +- .../implementation/SubscriptionImpl.java | 18 +- .../api/DeploymentOperationsInner.java | 6 +- .../implementation/api/DeploymentsInner.java | 18 +- .../implementation/api/FeatureClientImpl.java | 7 +- .../implementation/api/FeaturesInner.java | 12 +- .../implementation/api/PageImpl1.java | 73 +++ .../implementation/api/ProvidersInner.java | 10 +- .../api/ResourceGroupsInner.java | 20 +- .../api/ResourceManagementClientImpl.java | 21 +- ...ourceProviderOperationDefinitionInner.java | 64 --- ...ResourceProviderOperationDetailsInner.java | 217 -------- .../implementation/api/ResourcesInner.java | 14 +- .../api/SubscriptionClientImpl.java | 7 +- .../api/SubscriptionsInner.java | 110 +--- .../implementation/api/TagsInner.java | 12 +- .../implementation/api/TenantsInner.java | 20 +- .../implementation/StorageManager.java | 2 +- .../api/StorageAccountsInner.java | 18 +- .../api/StorageManagementClientImpl.java | 7 +- .../implementation/api/UsagesInner.java | 2 +- .../storage/StorageManagementTestBase.java | 2 +- .../api/CertificateOrdersInner.java | 32 +- .../implementation/api/CertificatesInner.java | 20 +- .../api/ClassicMobileServicesInner.java | 6 +- .../implementation/api/DomainsInner.java | 12 +- .../api/GlobalCertificateOrdersInner.java | 4 +- .../api/GlobalDomainRegistrationsInner.java | 10 +- .../api/GlobalResourceGroupsInner.java | 2 +- .../implementation/api/GlobalsInner.java | 26 +- .../api/HostingEnvironmentsInner.java | 74 +-- .../api/ManagedHostingEnvironmentsInner.java | 18 +- .../implementation/api/ProvidersInner.java | 10 +- .../api/RecommendationsInner.java | 8 +- .../implementation/api/ServerFarmsInner.java | 40 +- .../implementation/api/SitesInner.java | 322 ++++++------ .../api/TopLevelDomainsInner.java | 6 +- .../implementation/api/UsagesInner.java | 2 +- .../api/WebSiteManagementClientImpl.java | 23 +- .../main/java/com/microsoft/azure/Azure.java | 1 - 111 files changed, 1643 insertions(+), 1279 deletions(-) create mode 100644 azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/TypeFieldInfo.java create mode 100644 azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/USqlTableType.java create mode 100644 azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/PageImpl1.java delete mode 100644 azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourceProviderOperationDefinitionInner.java delete mode 100644 azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourceProviderOperationDetailsInner.java diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/BatchServiceClient.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/BatchServiceClient.java index 84ed10df2967..c57b066d5adc 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/BatchServiceClient.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/BatchServiceClient.java @@ -7,7 +7,7 @@ package com.microsoft.azure.batch.protocol; import com.microsoft.azure.AzureClient; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; /** * The interface for BatchServiceClient class. @@ -51,8 +51,9 @@ public interface BatchServiceClient { * Sets Gets or sets the preferred language for the response.. * * @param acceptLanguage the acceptLanguage value. + * @return the service client itself */ - void withAcceptLanguage(String acceptLanguage); + BatchServiceClient withAcceptLanguage(String acceptLanguage); /** * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.. @@ -65,8 +66,9 @@ public interface BatchServiceClient { * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.. * * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself */ - void withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout); + BatchServiceClient withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout); /** * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.. @@ -79,8 +81,9 @@ public interface BatchServiceClient { * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.. * * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself */ - void withGenerateClientRequestId(boolean generateClientRequestId); + BatchServiceClient withGenerateClientRequestId(boolean generateClientRequestId); /** * Gets the Applications object to access its operations. diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/AccountsImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/AccountsImpl.java index baa7869a1770..59a21481d139 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/AccountsImpl.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/AccountsImpl.java @@ -8,7 +8,6 @@ import retrofit2.Retrofit; import com.microsoft.azure.batch.protocol.Accounts; -import com.microsoft.azure.batch.protocol.BatchServiceClient; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.batch.protocol.models.AccountListNodeAgentSkusHeaders; @@ -45,7 +44,7 @@ public final class AccountsImpl implements Accounts { /** The Retrofit service to perform REST calls. */ private AccountsService service; /** The service client containing this operation class. */ - private BatchServiceClient client; + private BatchServiceClientImpl client; /** * Initializes an instance of AccountsImpl. @@ -53,7 +52,7 @@ public final class AccountsImpl implements Accounts { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public AccountsImpl(Retrofit retrofit, BatchServiceClient client) { + public AccountsImpl(Retrofit retrofit, BatchServiceClientImpl client) { this.service = retrofit.create(AccountsService.class); this.client = client; } @@ -290,7 +289,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, AccountListNodeAgentSkusHeaders> listNodeAgentSkusDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, AccountListNodeAgentSkusHeaders.class); @@ -461,7 +460,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, AccountListNodeAgentSkusHeaders> listNodeAgentSkusNextDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, AccountListNodeAgentSkusHeaders.class); diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/ApplicationsImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/ApplicationsImpl.java index 60e8ef2a04c1..3e434fbaec7d 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/ApplicationsImpl.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/ApplicationsImpl.java @@ -8,7 +8,6 @@ import retrofit2.Retrofit; import com.microsoft.azure.batch.protocol.Applications; -import com.microsoft.azure.batch.protocol.BatchServiceClient; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.batch.protocol.models.ApplicationGetHeaders; @@ -49,7 +48,7 @@ public final class ApplicationsImpl implements Applications { /** The Retrofit service to perform REST calls. */ private ApplicationsService service; /** The service client containing this operation class. */ - private BatchServiceClient client; + private BatchServiceClientImpl client; /** * Initializes an instance of ApplicationsImpl. @@ -57,7 +56,7 @@ public final class ApplicationsImpl implements Applications { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public ApplicationsImpl(Retrofit retrofit, BatchServiceClient client) { + public ApplicationsImpl(Retrofit retrofit, BatchServiceClientImpl client) { this.service = retrofit.create(ApplicationsService.class); this.client = client; } @@ -288,7 +287,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, ApplicationListHeaders> listDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, ApplicationListHeaders.class); @@ -467,7 +466,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders getDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, ApplicationGetHeaders.class); @@ -638,7 +637,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, ApplicationListHeaders> listNextDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, ApplicationListHeaders.class); diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/BatchServiceClientImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/BatchServiceClientImpl.java index 504f8bba5f42..7d6f877066a8 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/BatchServiceClientImpl.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/BatchServiceClientImpl.java @@ -18,9 +18,8 @@ import com.microsoft.azure.batch.protocol.JobSchedules; import com.microsoft.azure.batch.protocol.Pools; import com.microsoft.azure.batch.protocol.Tasks; -import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; /** * Initializes a new instance of the BatchServiceClientImpl class. @@ -65,9 +64,11 @@ public String acceptLanguage() { * Sets Gets or sets the preferred language for the response. * * @param acceptLanguage the acceptLanguage value. + * @return the service client itself */ - public void withAcceptLanguage(String acceptLanguage) { + public BatchServiceClientImpl withAcceptLanguage(String acceptLanguage) { this.acceptLanguage = acceptLanguage; + return this; } /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ @@ -86,9 +87,11 @@ public int longRunningOperationRetryTimeout() { * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. * * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself */ - public void withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + public BatchServiceClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; } /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ @@ -107,9 +110,11 @@ public boolean generateClientRequestId() { * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself */ - public void withGenerateClientRequestId(boolean generateClientRequestId) { + public BatchServiceClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { this.generateClientRequestId = generateClientRequestId; + return this; } /** @@ -245,8 +250,8 @@ public BatchServiceClientImpl(ServiceClientCredentials credentials) { * @param credentials the management credentials for Azure */ public BatchServiceClientImpl(String baseUrl, ServiceClientCredentials credentials) { - this(new RestClient.Builder(baseUrl) - .withMapperAdapter(new AzureJacksonMapperAdapter()) + this(new RestClient.Builder() + .withBaseUrl(baseUrl) .withCredentials(credentials) .build()); } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/CertificatesImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/CertificatesImpl.java index 5db89f4a8e16..b0c8d693d284 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/CertificatesImpl.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/CertificatesImpl.java @@ -8,7 +8,6 @@ import retrofit2.Retrofit; import com.microsoft.azure.batch.protocol.Certificates; -import com.microsoft.azure.batch.protocol.BatchServiceClient; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.batch.protocol.models.BatchErrorException; @@ -59,7 +58,7 @@ public final class CertificatesImpl implements Certificates { /** The Retrofit service to perform REST calls. */ private CertificatesService service; /** The service client containing this operation class. */ - private BatchServiceClient client; + private BatchServiceClientImpl client; /** * Initializes an instance of CertificatesImpl. @@ -67,7 +66,7 @@ public final class CertificatesImpl implements Certificates { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public CertificatesImpl(Retrofit retrofit, BatchServiceClient client) { + public CertificatesImpl(Retrofit retrofit, BatchServiceClientImpl client) { this.service = retrofit.create(CertificatesService.class); this.client = client; } @@ -280,7 +279,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders addDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, CertificateAddHeaders.class); @@ -513,7 +512,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, CertificateListHeaders> listDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, CertificateListHeaders.class); @@ -710,7 +709,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders cancelDeletionDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, CertificateCancelDeletionHeaders.class); @@ -907,7 +906,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders deleteDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, CertificateDeleteHeaders.class); @@ -1114,7 +1113,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders getDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, CertificateGetHeaders.class); @@ -1285,7 +1284,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, CertificateListHeaders> listNextDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, CertificateListHeaders.class); diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java index a3eb565f6f09..d48139c46133 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java @@ -8,7 +8,6 @@ import retrofit2.Retrofit; import com.microsoft.azure.batch.protocol.ComputeNodes; -import com.microsoft.azure.batch.protocol.BatchServiceClient; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.batch.protocol.models.BatchErrorException; @@ -82,7 +81,7 @@ public final class ComputeNodesImpl implements ComputeNodes { /** The Retrofit service to perform REST calls. */ private ComputeNodesService service; /** The service client containing this operation class. */ - private BatchServiceClient client; + private BatchServiceClientImpl client; /** * Initializes an instance of ComputeNodesImpl. @@ -90,7 +89,7 @@ public final class ComputeNodesImpl implements ComputeNodes { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public ComputeNodesImpl(Retrofit retrofit, BatchServiceClient client) { + public ComputeNodesImpl(Retrofit retrofit, BatchServiceClientImpl client) { this.service = retrofit.create(ComputeNodesService.class); this.client = client; } @@ -364,7 +363,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders addUserDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, ComputeNodeAddUserHeaders.class); @@ -579,7 +578,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders deleteUserDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, ComputeNodeDeleteUserHeaders.class); @@ -816,7 +815,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders updateUserDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, ComputeNodeUpdateUserHeaders.class); @@ -1023,7 +1022,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders getDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, ComputeNodeGetHeaders.class); @@ -1238,7 +1237,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders rebootDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, ComputeNodeRebootHeaders.class); @@ -1453,7 +1452,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders reimageDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, ComputeNodeReimageHeaders.class); @@ -1668,7 +1667,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders disableSchedulingDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, ComputeNodeDisableSchedulingHeaders.class); @@ -1865,7 +1864,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders enableSchedulingDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, ComputeNodeEnableSchedulingHeaders.class); @@ -2062,7 +2061,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders getRemoteLoginSettingsDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, ComputeNodeGetRemoteLoginSettingsHeaders.class); @@ -2259,7 +2258,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders getRemoteDesktopDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, ComputeNodeGetRemoteDesktopHeaders.class); @@ -2510,7 +2509,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, ComputeNodeListHeaders> listDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, ComputeNodeListHeaders.class); @@ -2681,7 +2680,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, ComputeNodeListHeaders> listNextDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, ComputeNodeListHeaders.class); diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java index ec0df50e1314..1546d85a3abb 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java @@ -8,7 +8,6 @@ import retrofit2.Retrofit; import com.microsoft.azure.batch.protocol.Files; -import com.microsoft.azure.batch.protocol.BatchServiceClient; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.batch.protocol.models.BatchErrorException; @@ -67,7 +66,7 @@ public final class FilesImpl implements Files { /** The Retrofit service to perform REST calls. */ private FilesService service; /** The service client containing this operation class. */ - private BatchServiceClient client; + private BatchServiceClientImpl client; /** * Initializes an instance of FilesImpl. @@ -75,7 +74,7 @@ public final class FilesImpl implements Files { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public FilesImpl(Retrofit retrofit, BatchServiceClient client) { + public FilesImpl(Retrofit retrofit, BatchServiceClientImpl client) { this.service = retrofit.create(FilesService.class); this.client = client; } @@ -342,7 +341,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders deleteFromTaskDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, FileDeleteFromTaskHeaders.class); @@ -619,7 +618,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders getFromTaskDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, FileGetFromTaskHeaders.class); @@ -886,7 +885,7 @@ public void onResponse(Call call, Response response) { } private ServiceResponseWithHeaders getNodeFilePropertiesFromTaskDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildEmptyWithHeaders(response, FileGetNodeFilePropertiesFromTaskHeaders.class); @@ -1105,7 +1104,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders deleteFromComputeNodeDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, FileDeleteFromComputeNodeHeaders.class); @@ -1382,7 +1381,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders getFromComputeNodeDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, FileGetFromComputeNodeHeaders.class); @@ -1649,7 +1648,7 @@ public void onResponse(Call call, Response response) { } private ServiceResponseWithHeaders getNodeFilePropertiesFromComputeNodeDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildEmptyWithHeaders(response, FileGetNodeFilePropertiesFromComputeNodeHeaders.class); @@ -1912,7 +1911,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, FileListFromTaskHeaders> listFromTaskDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, FileListFromTaskHeaders.class); @@ -2175,7 +2174,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, FileListFromComputeNodeHeaders> listFromComputeNodeDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, FileListFromComputeNodeHeaders.class); @@ -2346,7 +2345,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, FileListFromTaskHeaders> listFromTaskNextDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, FileListFromTaskHeaders.class); @@ -2517,7 +2516,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, FileListFromComputeNodeHeaders> listFromComputeNodeNextDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, FileListFromComputeNodeHeaders.class); diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobSchedulesImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobSchedulesImpl.java index 620034ec1050..d9d1616260b9 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobSchedulesImpl.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobSchedulesImpl.java @@ -8,7 +8,6 @@ import retrofit2.Retrofit; import com.microsoft.azure.batch.protocol.JobSchedules; -import com.microsoft.azure.batch.protocol.BatchServiceClient; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.batch.protocol.models.BatchErrorException; @@ -75,7 +74,7 @@ public final class JobSchedulesImpl implements JobSchedules { /** The Retrofit service to perform REST calls. */ private JobSchedulesService service; /** The service client containing this operation class. */ - private BatchServiceClient client; + private BatchServiceClientImpl client; /** * Initializes an instance of JobSchedulesImpl. @@ -83,7 +82,7 @@ public final class JobSchedulesImpl implements JobSchedules { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public JobSchedulesImpl(Retrofit retrofit, BatchServiceClient client) { + public JobSchedulesImpl(Retrofit retrofit, BatchServiceClientImpl client) { this.service = retrofit.create(JobSchedulesService.class); this.client = client; } @@ -384,7 +383,7 @@ public void onResponse(Call call, Response response) { } private ServiceResponseWithHeaders existsDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) @@ -636,7 +635,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders deleteDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobScheduleDeleteHeaders.class); @@ -907,7 +906,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders getDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobScheduleGetHeaders.class); @@ -1180,7 +1179,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders patchDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobSchedulePatchHeaders.class); @@ -1453,7 +1452,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders updateDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobScheduleUpdateHeaders.class); @@ -1704,7 +1703,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders disableDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobScheduleDisableHeaders.class); @@ -1955,7 +1954,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders enableDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobScheduleEnableHeaders.class); @@ -2206,7 +2205,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders terminateDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobScheduleTerminateHeaders.class); @@ -2389,7 +2388,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders addDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobScheduleAddHeaders.class); @@ -2632,7 +2631,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, JobScheduleListHeaders> listDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobScheduleListHeaders.class); @@ -2803,7 +2802,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, JobScheduleListHeaders> listNextDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobScheduleListHeaders.class); diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java index 0917a5c4b198..b703366af1aa 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java @@ -8,7 +8,6 @@ import retrofit2.Retrofit; import com.microsoft.azure.batch.protocol.Jobs; -import com.microsoft.azure.batch.protocol.BatchServiceClient; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.batch.protocol.models.BatchErrorException; @@ -84,7 +83,7 @@ public final class JobsImpl implements Jobs { /** The Retrofit service to perform REST calls. */ private JobsService service; /** The service client containing this operation class. */ - private BatchServiceClient client; + private BatchServiceClientImpl client; /** * Initializes an instance of JobsImpl. @@ -92,7 +91,7 @@ public final class JobsImpl implements Jobs { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public JobsImpl(Retrofit retrofit, BatchServiceClient client) { + public JobsImpl(Retrofit retrofit, BatchServiceClientImpl client) { this.service = retrofit.create(JobsService.class); this.client = client; } @@ -319,7 +318,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders getAllJobsLifetimeStatisticsDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobGetAllJobsLifetimeStatisticsHeaders.class); @@ -570,7 +569,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders deleteDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobDeleteHeaders.class); @@ -769,7 +768,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders getDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobGetHeaders.class); @@ -1042,7 +1041,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders patchDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobPatchHeaders.class); @@ -1315,7 +1314,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders updateDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobUpdateHeaders.class); @@ -1592,7 +1591,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders disableDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobDisableHeaders.class); @@ -1843,7 +1842,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders enableDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobEnableHeaders.class); @@ -2112,7 +2111,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders terminateDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobTerminateHeaders.class); @@ -2295,7 +2294,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders addDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobAddHeaders.class); @@ -2538,7 +2537,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, JobListHeaders> listDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobListHeaders.class); @@ -2799,7 +2798,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, JobListFromJobScheduleHeaders> listFromJobScheduleDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobListFromJobScheduleHeaders.class); @@ -3050,7 +3049,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, JobListPreparationAndReleaseTaskStatusHeaders> listPreparationAndReleaseTaskStatusDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobListPreparationAndReleaseTaskStatusHeaders.class); @@ -3221,7 +3220,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, JobListHeaders> listNextDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobListHeaders.class); @@ -3392,7 +3391,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, JobListFromJobScheduleHeaders> listFromJobScheduleNextDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobListFromJobScheduleHeaders.class); @@ -3563,7 +3562,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, JobListPreparationAndReleaseTaskStatusHeaders> listPreparationAndReleaseTaskStatusNextDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, JobListPreparationAndReleaseTaskStatusHeaders.class); diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java index fdb47c7a2208..888258c3e546 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java @@ -8,7 +8,6 @@ import retrofit2.Retrofit; import com.microsoft.azure.batch.protocol.Pools; -import com.microsoft.azure.batch.protocol.BatchServiceClient; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.batch.protocol.models.AutoScaleRun; @@ -95,7 +94,7 @@ public final class PoolsImpl implements Pools { /** The Retrofit service to perform REST calls. */ private PoolsService service; /** The service client containing this operation class. */ - private BatchServiceClient client; + private BatchServiceClientImpl client; /** * Initializes an instance of PoolsImpl. @@ -103,7 +102,7 @@ public final class PoolsImpl implements Pools { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public PoolsImpl(Retrofit retrofit, BatchServiceClient client) { + public PoolsImpl(Retrofit retrofit, BatchServiceClientImpl client) { this.service = retrofit.create(PoolsService.class); this.client = client; } @@ -424,7 +423,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, PoolListPoolUsageMetricsHeaders> listPoolUsageMetricsDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolListPoolUsageMetricsHeaders.class); @@ -585,7 +584,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders getAllPoolsLifetimeStatisticsDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolGetAllPoolsLifetimeStatisticsHeaders.class); @@ -768,7 +767,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders addDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolAddHeaders.class); @@ -1011,7 +1010,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, PoolListHeaders> listDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolListHeaders.class); @@ -1262,7 +1261,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders deleteDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolDeleteHeaders.class); @@ -1513,7 +1512,7 @@ public void onResponse(Call call, Response response) { } private ServiceResponseWithHeaders existsDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) @@ -1785,7 +1784,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders getDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolGetHeaders.class); @@ -2058,7 +2057,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders patchDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolPatchHeaders.class); @@ -2237,7 +2236,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders disableAutoScaleDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolDisableAutoScaleHeaders.class); @@ -2510,7 +2509,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders enableAutoScaleDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolEnableAutoScaleHeaders.class); @@ -2715,7 +2714,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders evaluateAutoScaleDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolEvaluateAutoScaleHeaders.class); @@ -2988,7 +2987,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders resizeDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolResizeHeaders.class); @@ -3239,7 +3238,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders stopResizeDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolStopResizeHeaders.class); @@ -3440,7 +3439,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders updatePropertiesDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolUpdatePropertiesHeaders.class); @@ -3717,7 +3716,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders upgradeOSDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolUpgradeOSHeaders.class); @@ -3990,7 +3989,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders removeNodesDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolRemoveNodesHeaders.class); @@ -4161,7 +4160,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, PoolListPoolUsageMetricsHeaders> listPoolUsageMetricsNextDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolListPoolUsageMetricsHeaders.class); @@ -4332,7 +4331,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, PoolListHeaders> listNextDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, PoolListHeaders.class); diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java index faf5eeb23227..964174c38e18 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java @@ -8,7 +8,6 @@ import retrofit2.Retrofit; import com.microsoft.azure.batch.protocol.Tasks; -import com.microsoft.azure.batch.protocol.BatchServiceClient; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.batch.protocol.models.BatchErrorException; @@ -41,7 +40,6 @@ import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.DateTimeRfc1123; -import com.microsoft.rest.serializer.CollectionFormat; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponseCallback; @@ -72,7 +70,7 @@ public final class TasksImpl implements Tasks { /** The Retrofit service to perform REST calls. */ private TasksService service; /** The service client containing this operation class. */ - private BatchServiceClient client; + private BatchServiceClientImpl client; /** * Initializes an instance of TasksImpl. @@ -80,7 +78,7 @@ public final class TasksImpl implements Tasks { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public TasksImpl(Retrofit retrofit, BatchServiceClient client) { + public TasksImpl(Retrofit retrofit, BatchServiceClientImpl client) { this.service = retrofit.create(TasksService.class); this.client = client; } @@ -323,7 +321,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders addDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, TaskAddHeaders.class); @@ -584,7 +582,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, TaskListHeaders> listDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, TaskListHeaders.class); @@ -793,7 +791,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders addCollectionDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, TaskAddCollectionHeaders.class); @@ -1062,7 +1060,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders deleteDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, TaskDeleteHeaders.class); @@ -1351,7 +1349,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders getDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, TaskGetHeaders.class); @@ -1634,7 +1632,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders updateDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, TaskUpdateHeaders.class); @@ -1841,7 +1839,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders listSubtasksDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, TaskListSubtasksHeaders.class); @@ -2110,7 +2108,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders terminateDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, TaskTerminateHeaders.class); @@ -2281,7 +2279,7 @@ public void onResponse(Call call, Response response) } private ServiceResponseWithHeaders, TaskListHeaders> listNextDelegate(Response response) throws BatchErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, BatchErrorException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, BatchErrorException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(BatchErrorException.class) .buildWithHeaders(response, TaskListHeaders.class); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManager.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManager.java index 4c2069028c62..7736688b8e55 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManager.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManager.java @@ -10,7 +10,7 @@ import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; import com.microsoft.azure.management.storage.implementation.StorageManager; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; /** diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/AvailabilitySetsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/AvailabilitySetsInner.java index 799c6d3547b4..89140042fe9e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/AvailabilitySetsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/AvailabilitySetsInner.java @@ -160,7 +160,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -238,7 +238,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .build(response); @@ -316,7 +316,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -388,7 +388,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -469,7 +469,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAvailableSizesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ComputeManagementClientImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ComputeManagementClientImpl.java index 1361929c8812..93f05c111cdf 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ComputeManagementClientImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ComputeManagementClientImpl.java @@ -8,9 +8,8 @@ import com.microsoft.azure.AzureClient; import com.microsoft.azure.AzureServiceClient; -import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; /** * Initializes a new instance of the ComputeManagementClientImpl class. @@ -43,9 +42,11 @@ public String subscriptionId() { * Sets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. * * @param subscriptionId the subscriptionId value. + * @return the service client itself */ - public void withSubscriptionId(String subscriptionId) { + public ComputeManagementClientImpl withSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; + return this; } /** Client Api Version. */ @@ -76,9 +77,11 @@ public String acceptLanguage() { * Sets Gets or sets the preferred language for the response. * * @param acceptLanguage the acceptLanguage value. + * @return the service client itself */ - public void withAcceptLanguage(String acceptLanguage) { + public ComputeManagementClientImpl withAcceptLanguage(String acceptLanguage) { this.acceptLanguage = acceptLanguage; + return this; } /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ @@ -97,9 +100,11 @@ public int longRunningOperationRetryTimeout() { * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. * * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself */ - public void withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + public ComputeManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; } /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ @@ -118,9 +123,11 @@ public boolean generateClientRequestId() { * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself */ - public void withGenerateClientRequestId(boolean generateClientRequestId) { + public ComputeManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { this.generateClientRequestId = generateClientRequestId; + return this; } /** @@ -256,8 +263,8 @@ public ComputeManagementClientImpl(ServiceClientCredentials credentials) { * @param credentials the management credentials for Azure */ public ComputeManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - this(new RestClient.Builder(baseUrl) - .withMapperAdapter(new AzureJacksonMapperAdapter()) + this(new RestClient.Builder() + .withBaseUrl(baseUrl) .withCredentials(credentials) .build()); } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/UsagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/UsagesInner.java index a2be9ba93fb3..96c58c68b67e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/UsagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/UsagesInner.java @@ -141,7 +141,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -204,7 +204,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineExtensionImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineExtensionImagesInner.java index 12fd15f182d7..e4204df37aef 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineExtensionImagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineExtensionImagesInner.java @@ -155,7 +155,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -233,7 +233,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listTypesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -412,7 +412,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listVersionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineExtensionsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineExtensionsInner.java index 0d5cd1fc5557..94d5c21fd9f8 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineExtensionsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineExtensionsInner.java @@ -255,7 +255,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -419,7 +419,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .build(response); @@ -590,7 +590,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineImagesInner.java index e66e71c6a93c..2f310727ca5f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineImagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineImagesInner.java @@ -172,7 +172,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -369,7 +369,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -447,7 +447,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listOffersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -516,7 +516,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listPublishersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -603,7 +603,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listSkusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineScaleSetVMsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineScaleSetVMsInner.java index 0601f4c10a6d..3e2f4751ad34 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineScaleSetVMsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineScaleSetVMsInner.java @@ -281,7 +281,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginReimageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -443,7 +443,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -605,7 +605,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) @@ -693,7 +693,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -780,7 +780,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getInstanceViewDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -969,7 +969,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1132,7 +1132,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -1294,7 +1294,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -1456,7 +1456,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -1518,7 +1518,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineScaleSetsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineScaleSetsInner.java index d25ec56ec9bb..43ab4db49958 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineScaleSetsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineScaleSetsInner.java @@ -6,6 +6,7 @@ package com.microsoft.azure.management.compute.implementation.api; +import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.CloudException; @@ -17,24 +18,22 @@ import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.ServiceResponseCallback; import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; import okhttp3.ResponseBody; import retrofit2.Call; import retrofit2.Callback; -import retrofit2.Response; -import retrofit2.Retrofit; import retrofit2.http.Body; import retrofit2.http.GET; -import retrofit2.http.HTTP; 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.Path; import retrofit2.http.Query; import retrofit2.http.Url; - -import java.io.IOException; -import java.util.List; +import retrofit2.Response; /** * An instance of this class provides access to all the operations defined @@ -329,7 +328,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -654,7 +653,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -799,7 +798,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) @@ -878,7 +877,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1053,7 +1052,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteInstancesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -1130,7 +1129,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getInstanceViewDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1213,7 +1212,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1287,7 +1286,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1379,7 +1378,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listSkusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1703,7 +1702,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -2026,7 +2025,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -2349,7 +2348,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -2523,7 +2522,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginUpdateInstancesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -2668,7 +2667,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginReimageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -2730,7 +2729,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2793,7 +2792,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2856,7 +2855,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listSkusNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineSizesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineSizesInner.java index d95c032a6a29..90821df9704a 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineSizesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineSizesInner.java @@ -123,7 +123,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachinesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachinesInner.java index 2b8e7153fccb..4e2369c34348 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachinesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachinesInner.java @@ -312,7 +312,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCaptureDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -480,7 +480,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -627,7 +627,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .build(response); @@ -780,7 +780,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -926,7 +926,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -1003,7 +1003,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse generalizeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .build(response); } @@ -1074,7 +1074,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1148,7 +1148,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1229,7 +1229,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAvailableSizesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1375,7 +1375,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -1520,7 +1520,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -1665,7 +1665,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -1810,7 +1810,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); } @@ -1872,7 +1872,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/test/java/com/microsoft/azure/management/compute/ComputeManagementTestBase.java b/azure-mgmt-compute/src/test/java/com/microsoft/azure/management/compute/ComputeManagementTestBase.java index 7453733454b3..aa74a9476f24 100644 --- a/azure-mgmt-compute/src/test/java/com/microsoft/azure/management/compute/ComputeManagementTestBase.java +++ b/azure-mgmt-compute/src/test/java/com/microsoft/azure/management/compute/ComputeManagementTestBase.java @@ -6,7 +6,7 @@ import com.microsoft.azure.management.network.implementation.api.NetworkManagementClientImpl; import com.microsoft.azure.management.resources.implementation.api.ResourceManagementClientImpl; import com.microsoft.azure.management.storage.implementation.api.StorageManagementClientImpl; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; import okhttp3.logging.HttpLoggingInterceptor; public abstract class ComputeManagementTestBase { @@ -22,7 +22,7 @@ public static void createClients() { System.getenv("secret"), null); - RestClient.Builder restBuilder = AzureEnvironment.AZURE.newRestClientBuilder() + RestClient.Builder.Buildable restBuilder = AzureEnvironment.AZURE.newRestClientBuilder() .withCredentials(credentials) .withLogLevel(HttpLoggingInterceptor.Level.BODY); diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Catalogs.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Catalogs.java index 9bf42b2e324a..efcfbdc06f91 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Catalogs.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Catalogs.java @@ -21,6 +21,7 @@ import com.microsoft.azure.management.datalake.analytics.models.USqlTable; import com.microsoft.azure.management.datalake.analytics.models.USqlTablePartition; import com.microsoft.azure.management.datalake.analytics.models.USqlTableStatistics; +import com.microsoft.azure.management.datalake.analytics.models.USqlTableType; import com.microsoft.azure.management.datalake.analytics.models.USqlTableValuedFunction; import com.microsoft.azure.management.datalake.analytics.models.USqlType; import com.microsoft.azure.management.datalake.analytics.models.USqlView; @@ -510,6 +511,96 @@ public interface Catalogs { */ ServiceCall listTablesAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) throws IllegalArgumentException; + /** + * Retrieves the specified table type from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table type. + * @param schemaName The name of the schema containing the table type. + * @param tableTypeName The name of the table type to retrieve. + * @throws CloudException exception thrown from REST call + * @throws IOException exception thrown from serialization/deserialization + * @throws IllegalArgumentException exception thrown from invalid parameters + * @return the USqlTableType object wrapped in {@link ServiceResponse} if successful. + */ + ServiceResponse getTableType(String accountName, String databaseName, String schemaName, String tableTypeName) throws CloudException, IOException, IllegalArgumentException; + + /** + * Retrieves the specified table type from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table type. + * @param schemaName The name of the schema containing the table type. + * @param tableTypeName The name of the table type to retrieve. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link ServiceCall} object + */ + ServiceCall getTableTypeAsync(String accountName, String databaseName, String schemaName, String tableTypeName, final ServiceCallback serviceCallback) throws IllegalArgumentException; + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @throws CloudException exception thrown from REST call + * @throws IOException exception thrown from serialization/deserialization + * @throws IllegalArgumentException exception thrown from invalid parameters + * @return the List<USqlTableType> object wrapped in {@link ServiceResponse} if successful. + */ + ServiceResponse> listTableTypes(final String accountName, final String databaseName, final String schemaName) throws CloudException, IOException, IllegalArgumentException; + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link ServiceCall} object + */ + ServiceCall listTableTypesAsync(final String accountName, final String databaseName, final String schemaName, final ListOperationCallback serviceCallback) throws IllegalArgumentException; + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws CloudException exception thrown from REST call + * @throws IOException exception thrown from serialization/deserialization + * @throws IllegalArgumentException exception thrown from invalid parameters + * @return the List<USqlTableType> object wrapped in {@link ServiceResponse} if successful. + */ + ServiceResponse> listTableTypes(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) throws CloudException, IOException, IllegalArgumentException; + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link ServiceCall} object + */ + ServiceCall listTableTypesAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) throws IllegalArgumentException; + /** * Retrieves the specified view from the Data Lake Analytics catalog. * @@ -1279,6 +1370,28 @@ public interface Catalogs { */ ServiceCall listTablesNextAsync(final String nextPageLink, final ServiceCall serviceCall, final ListOperationCallback serviceCallback) throws IllegalArgumentException; + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws CloudException exception thrown from REST call + * @throws IOException exception thrown from serialization/deserialization + * @throws IllegalArgumentException exception thrown from invalid parameters + * @return the List<USqlTableType> object wrapped in {@link ServiceResponse} if successful. + */ + ServiceResponse> listTableTypesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException; + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link ServiceCall} object + */ + ServiceCall listTableTypesNextAsync(final String nextPageLink, final ServiceCall serviceCall, final ListOperationCallback serviceCallback) throws IllegalArgumentException; + /** * Retrieves the list of views from the Data Lake Analytics catalog. * diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/DataLakeAnalyticsAccountManagementClient.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/DataLakeAnalyticsAccountManagementClient.java index 44238359532d..77a0c952cde4 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/DataLakeAnalyticsAccountManagementClient.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/DataLakeAnalyticsAccountManagementClient.java @@ -7,7 +7,7 @@ package com.microsoft.azure.management.datalake.analytics; import com.microsoft.azure.AzureClient; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; /** * The interface for DataLakeAnalyticsAccountManagementClient class. diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/DataLakeAnalyticsCatalogManagementClient.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/DataLakeAnalyticsCatalogManagementClient.java index 5c9c03b726c3..6aeda55869e9 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/DataLakeAnalyticsCatalogManagementClient.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/DataLakeAnalyticsCatalogManagementClient.java @@ -7,7 +7,7 @@ package com.microsoft.azure.management.datalake.analytics; import com.microsoft.azure.AzureClient; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; /** * The interface for DataLakeAnalyticsCatalogManagementClient class. diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/DataLakeAnalyticsJobManagementClient.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/DataLakeAnalyticsJobManagementClient.java index 0688adc92022..f9bcdcb3c5e3 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/DataLakeAnalyticsJobManagementClient.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/DataLakeAnalyticsJobManagementClient.java @@ -7,7 +7,7 @@ package com.microsoft.azure.management.datalake.analytics; import com.microsoft.azure.AzureClient; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; /** * The interface for DataLakeAnalyticsJobManagementClient class. diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/AccountsImpl.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/AccountsImpl.java index 074ee2e412f8..42cb8b4a0129 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/AccountsImpl.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/AccountsImpl.java @@ -8,7 +8,6 @@ import retrofit2.Retrofit; import com.microsoft.azure.management.datalake.analytics.Accounts; -import com.microsoft.azure.management.datalake.analytics.DataLakeAnalyticsAccountManagementClient; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.CloudException; @@ -54,7 +53,7 @@ public final class AccountsImpl implements Accounts { /** The Retrofit service to perform REST calls. */ private AccountsService service; /** The service client containing this operation class. */ - private DataLakeAnalyticsAccountManagementClient client; + private DataLakeAnalyticsAccountManagementClientImpl client; /** * Initializes an instance of AccountsImpl. @@ -62,7 +61,7 @@ public final class AccountsImpl implements Accounts { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public AccountsImpl(Retrofit retrofit, DataLakeAnalyticsAccountManagementClient client) { + public AccountsImpl(Retrofit retrofit, DataLakeAnalyticsAccountManagementClientImpl client) { this.service = retrofit.create(AccountsService.class); this.client = client; } @@ -263,7 +262,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getStorageAccountDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -350,7 +349,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteStorageAccountDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .build(response); } @@ -447,7 +446,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateStorageAccountDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .build(response); } @@ -544,7 +543,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse addStorageAccountDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .build(response); } @@ -639,7 +638,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getStorageContainerDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -740,7 +739,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listStorageContainersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -850,7 +849,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listSasTokensDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -937,7 +936,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDataLakeStoreAccountDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1024,7 +1023,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteDataLakeStoreAccountDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .build(response); } @@ -1121,7 +1120,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse addDataLakeStoreAccountDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .build(response); } @@ -1333,7 +1332,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listStorageAccountsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1546,7 +1545,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDataLakeStoreAccountsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1741,7 +1740,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1918,7 +1917,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1996,7 +1995,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2142,7 +2141,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) @@ -2311,7 +2310,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -2479,7 +2478,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -2543,7 +2542,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listStorageContainersNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2606,7 +2605,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listSasTokensNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2669,7 +2668,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listStorageAccountsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2732,7 +2731,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDataLakeStoreAccountsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2795,7 +2794,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2858,7 +2857,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/CatalogsImpl.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/CatalogsImpl.java index 4076cd0ff0d1..16983b8f7679 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/CatalogsImpl.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/CatalogsImpl.java @@ -8,7 +8,6 @@ import retrofit2.Retrofit; import com.microsoft.azure.management.datalake.analytics.Catalogs; -import com.microsoft.azure.management.datalake.analytics.DataLakeAnalyticsCatalogManagementClient; import com.google.common.base.Joiner; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; @@ -27,6 +26,7 @@ import com.microsoft.azure.management.datalake.analytics.models.USqlTable; import com.microsoft.azure.management.datalake.analytics.models.USqlTablePartition; import com.microsoft.azure.management.datalake.analytics.models.USqlTableStatistics; +import com.microsoft.azure.management.datalake.analytics.models.USqlTableType; import com.microsoft.azure.management.datalake.analytics.models.USqlTableValuedFunction; import com.microsoft.azure.management.datalake.analytics.models.USqlType; import com.microsoft.azure.management.datalake.analytics.models.USqlView; @@ -61,7 +61,7 @@ public final class CatalogsImpl implements Catalogs { /** The Retrofit service to perform REST calls. */ private CatalogsService service; /** The service client containing this operation class. */ - private DataLakeAnalyticsCatalogManagementClient client; + private DataLakeAnalyticsCatalogManagementClientImpl client; /** * Initializes an instance of CatalogsImpl. @@ -69,7 +69,7 @@ public final class CatalogsImpl implements Catalogs { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public CatalogsImpl(Retrofit retrofit, DataLakeAnalyticsCatalogManagementClient client) { + public CatalogsImpl(Retrofit retrofit, DataLakeAnalyticsCatalogManagementClientImpl client) { this.service = retrofit.create(CatalogsService.class); this.client = client; } @@ -131,6 +131,14 @@ interface CatalogsService { @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables") Call listTables(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$expand") String expand, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + @Headers("Content-Type: application/json; charset=utf-8") + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/tabletypes/{tableTypeName}") + Call getTableType(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Path("tableTypeName") String tableTypeName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/tabletypes") + Call listTableTypes(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Query("$filter") String filter, @Query("$top") Integer top, @Query("$skip") Integer skip, @Query("$expand") String expand, @Query("$select") String select, @Query("$orderby") String orderby, @Query("$count") Boolean count, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + @Headers("Content-Type: application/json; charset=utf-8") @GET("catalog/usql/databases/{databaseName}/schemas/{schemaName}/views/{viewName}") Call getView(@Path("databaseName") String databaseName, @Path("schemaName") String schemaName, @Path("viewName") String viewName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @@ -207,6 +215,10 @@ interface CatalogsService { @GET Call listTablesNext(@Url String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers("Content-Type: application/json; charset=utf-8") + @GET + Call listTableTypesNext(@Url String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers("Content-Type: application/json; charset=utf-8") @GET Call listViewsNext(@Url String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -335,7 +347,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createSecretDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -435,7 +447,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSecretDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -524,7 +536,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSecretDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -613,7 +625,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteSecretDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .build(response); } @@ -692,7 +704,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteAllSecretsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .build(response); } @@ -780,7 +792,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getExternalDataSourceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -989,7 +1001,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listExternalDataSourcesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1078,7 +1090,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getCredentialDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1287,7 +1299,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1385,7 +1397,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getProcedureDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1612,7 +1624,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listProceduresDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1710,7 +1722,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getTableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1937,12 +1949,337 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listTablesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } + /** + * Retrieves the specified table type from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table type. + * @param schemaName The name of the schema containing the table type. + * @param tableTypeName The name of the table type to retrieve. + * @throws CloudException exception thrown from REST call + * @throws IOException exception thrown from serialization/deserialization + * @throws IllegalArgumentException exception thrown from invalid parameters + * @return the USqlTableType object wrapped in {@link ServiceResponse} if successful. + */ + public ServiceResponse getTableType(String accountName, String databaseName, String schemaName, String tableTypeName) throws CloudException, IOException, IllegalArgumentException { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (tableTypeName == null) { + throw new IllegalArgumentException("Parameter tableTypeName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + Call call = service.getTableType(databaseName, schemaName, tableTypeName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()); + return getTableTypeDelegate(call.execute()); + } + + /** + * Retrieves the specified table type from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table type. + * @param schemaName The name of the schema containing the table type. + * @param tableTypeName The name of the table type to retrieve. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link Call} object + */ + public ServiceCall getTableTypeAsync(String accountName, String databaseName, String schemaName, String tableTypeName, final ServiceCallback serviceCallback) throws IllegalArgumentException { + if (serviceCallback == null) { + throw new IllegalArgumentException("ServiceCallback is required for async calls."); + } + if (accountName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + return null; + } + if (this.client.adlaCatalogDnsSuffix() == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null.")); + return null; + } + if (databaseName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + return null; + } + if (schemaName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); + return null; + } + if (tableTypeName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter tableTypeName is required and cannot be null.")); + return null; + } + if (this.client.apiVersion() == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.")); + return null; + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + Call call = service.getTableType(databaseName, schemaName, tableTypeName, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()); + final ServiceCall serviceCall = new ServiceCall(call); + call.enqueue(new ServiceResponseCallback(serviceCallback) { + @Override + public void onResponse(Call call, Response response) { + try { + serviceCallback.success(getTableTypeDelegate(response)); + } catch (CloudException | IOException exception) { + serviceCallback.failure(exception); + } + } + }); + return serviceCall; + } + + private ServiceResponse getTableTypeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @throws CloudException exception thrown from REST call + * @throws IOException exception thrown from serialization/deserialization + * @throws IllegalArgumentException exception thrown from invalid parameters + * @return the List<USqlTableType> object wrapped in {@link ServiceResponse} if successful. + */ + public ServiceResponse> listTableTypes(final String accountName, final String databaseName, final String schemaName) throws CloudException, IOException, IllegalArgumentException { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final Integer top = null; + final Integer skip = null; + final String expand = null; + final String select = null; + final String orderby = null; + final Boolean count = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + Call call = service.listTableTypes(databaseName, schemaName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()); + ServiceResponse> response = listTableTypesDelegate(call.execute()); + PagedList result = new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) throws CloudException, IOException { + return listTableTypesNext(nextPageLink).getBody(); + } + }; + return new ServiceResponse<>(result, response.getResponse()); + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link Call} object + */ + public ServiceCall listTableTypesAsync(final String accountName, final String databaseName, final String schemaName, final ListOperationCallback serviceCallback) throws IllegalArgumentException { + if (serviceCallback == null) { + throw new IllegalArgumentException("ServiceCallback is required for async calls."); + } + if (accountName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + return null; + } + if (this.client.adlaCatalogDnsSuffix() == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null.")); + return null; + } + if (databaseName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + return null; + } + if (schemaName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); + return null; + } + if (this.client.apiVersion() == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.")); + return null; + } + final String filter = null; + final Integer top = null; + final Integer skip = null; + final String expand = null; + final String select = null; + final String orderby = null; + final Boolean count = null; + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + Call call = service.listTableTypes(databaseName, schemaName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()); + final ServiceCall serviceCall = new ServiceCall(call); + call.enqueue(new ServiceResponseCallback>(serviceCallback) { + @Override + public void onResponse(Call call, Response response) { + try { + ServiceResponse> result = listTableTypesDelegate(response); + serviceCallback.load(result.getBody().getItems()); + if (result.getBody().getNextPageLink() != null + && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { + listTableTypesNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); + } else { + serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); + } + } catch (CloudException | IOException exception) { + serviceCallback.failure(exception); + } + } + }); + return serviceCall; + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @throws CloudException exception thrown from REST call + * @throws IOException exception thrown from serialization/deserialization + * @throws IllegalArgumentException exception thrown from invalid parameters + * @return the List<USqlTableType> object wrapped in {@link ServiceResponse} if successful. + */ + public ServiceResponse> listTableTypes(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count) throws CloudException, IOException, IllegalArgumentException { + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.adlaCatalogDnsSuffix() == null) { + throw new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null."); + } + if (databaseName == null) { + throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + Call call = service.listTableTypes(databaseName, schemaName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()); + ServiceResponse> response = listTableTypesDelegate(call.execute()); + PagedList result = new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) throws CloudException, IOException { + return listTableTypesNext(nextPageLink).getBody(); + } + }; + return new ServiceResponse<>(result, response.getResponse()); + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param accountName The Azure Data Lake Analytics account to execute catalog operations on. + * @param databaseName The name of the database containing the table types. + * @param schemaName The name of the schema containing the table types. + * @param filter OData filter. Optional. + * @param top The number of items to return. Optional. + * @param skip The number of items to skip over before returning elements. Optional. + * @param expand OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry. Optional. + * @param select OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. + * @param orderby OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. + * @param count The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link Call} object + */ + public ServiceCall listTableTypesAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String expand, final String select, final String orderby, final Boolean count, final ListOperationCallback serviceCallback) throws IllegalArgumentException { + if (serviceCallback == null) { + throw new IllegalArgumentException("ServiceCallback is required for async calls."); + } + if (accountName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + return null; + } + if (this.client.adlaCatalogDnsSuffix() == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter this.client.adlaCatalogDnsSuffix() is required and cannot be null.")); + return null; + } + if (databaseName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + return null; + } + if (schemaName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); + return null; + } + if (this.client.apiVersion() == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.")); + return null; + } + String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlaCatalogDnsSuffix}", this.client.adlaCatalogDnsSuffix()); + Call call = service.listTableTypes(databaseName, schemaName, filter, top, skip, expand, select, orderby, count, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()); + final ServiceCall serviceCall = new ServiceCall(call); + call.enqueue(new ServiceResponseCallback>(serviceCallback) { + @Override + public void onResponse(Call call, Response response) { + try { + ServiceResponse> result = listTableTypesDelegate(response); + serviceCallback.load(result.getBody().getItems()); + if (result.getBody().getNextPageLink() != null + && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { + listTableTypesNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); + } else { + serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); + } + } catch (CloudException | IOException exception) { + serviceCallback.failure(exception); + } + } + }); + return serviceCall; + } + + private ServiceResponse> listTableTypesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Retrieves the specified view from the Data Lake Analytics catalog. * @@ -2035,7 +2372,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getViewDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2262,7 +2599,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listViewsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2369,7 +2706,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getTableStatisticDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2614,7 +2951,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listTableStatisticsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2721,7 +3058,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getTablePartitionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2966,7 +3303,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listTablePartitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3193,7 +3530,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listTypesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3291,7 +3628,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getTableValuedFunctionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3518,7 +3855,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listTableValuedFunctionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3607,7 +3944,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getAssemblyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3816,7 +4153,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAssembliesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3905,7 +4242,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSchemaDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4114,7 +4451,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listSchemasDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4194,7 +4531,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDatabaseDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4385,7 +4722,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDatabasesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4448,7 +4785,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listExternalDataSourcesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4511,7 +4848,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listCredentialsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4574,7 +4911,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listProceduresNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4637,12 +4974,75 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listTablesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws CloudException exception thrown from REST call + * @throws IOException exception thrown from serialization/deserialization + * @throws IllegalArgumentException exception thrown from invalid parameters + * @return the List<USqlTableType> object wrapped in {@link ServiceResponse} if successful. + */ + public ServiceResponse> listTableTypesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + Call call = service.listTableTypesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()); + return listTableTypesNextDelegate(call.execute()); + } + + /** + * Retrieves the list of table types from the Data Lake Analytics catalog. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link Call} object + */ + public ServiceCall listTableTypesNextAsync(final String nextPageLink, final ServiceCall serviceCall, final ListOperationCallback serviceCallback) throws IllegalArgumentException { + if (serviceCallback == null) { + throw new IllegalArgumentException("ServiceCallback is required for async calls."); + } + if (nextPageLink == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.")); + return null; + } + Call call = service.listTableTypesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()); + serviceCall.newCall(call); + call.enqueue(new ServiceResponseCallback>(serviceCallback) { + @Override + public void onResponse(Call call, Response response) { + try { + ServiceResponse> result = listTableTypesNextDelegate(response); + serviceCallback.load(result.getBody().getItems()); + if (result.getBody().getNextPageLink() != null + && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { + listTableTypesNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); + } else { + serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); + } + } catch (CloudException | IOException exception) { + serviceCallback.failure(exception); + } + } + }); + return serviceCall; + } + + private ServiceResponse> listTableTypesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Retrieves the list of views from the Data Lake Analytics catalog. * @@ -4700,7 +5100,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listViewsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4763,7 +5163,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listTableStatisticsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4826,7 +5226,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listTablePartitionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4889,7 +5289,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listTypesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4952,7 +5352,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listTableValuedFunctionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -5015,7 +5415,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAssembliesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -5078,7 +5478,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listSchemasNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -5141,7 +5541,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDatabasesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/DataLakeAnalyticsAccountManagementClientImpl.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/DataLakeAnalyticsAccountManagementClientImpl.java index b1818ea28201..1035f31f56f8 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/DataLakeAnalyticsAccountManagementClientImpl.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/DataLakeAnalyticsAccountManagementClientImpl.java @@ -10,9 +10,8 @@ import com.microsoft.azure.AzureServiceClient; import com.microsoft.azure.management.datalake.analytics.Accounts; import com.microsoft.azure.management.datalake.analytics.DataLakeAnalyticsAccountManagementClient; -import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; /** * Initializes a new instance of the DataLakeAnalyticsAccountManagementClientImpl class. @@ -162,8 +161,8 @@ public DataLakeAnalyticsAccountManagementClientImpl(ServiceClientCredentials cre * @param credentials the management credentials for Azure */ public DataLakeAnalyticsAccountManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - this(new RestClient.Builder(baseUrl) - .withMapperAdapter(new AzureJacksonMapperAdapter()) + this(new RestClient.Builder() + .withBaseUrl(baseUrl) .withCredentials(credentials) .build()); } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/DataLakeAnalyticsCatalogManagementClientImpl.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/DataLakeAnalyticsCatalogManagementClientImpl.java index 7251a6659a5f..0182617fab44 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/DataLakeAnalyticsCatalogManagementClientImpl.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/DataLakeAnalyticsCatalogManagementClientImpl.java @@ -10,9 +10,8 @@ import com.microsoft.azure.AzureServiceClient; import com.microsoft.azure.management.datalake.analytics.Catalogs; import com.microsoft.azure.management.datalake.analytics.DataLakeAnalyticsCatalogManagementClient; -import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; /** * Initializes a new instance of the DataLakeAnalyticsCatalogManagementClientImpl class. @@ -162,8 +161,8 @@ public DataLakeAnalyticsCatalogManagementClientImpl(ServiceClientCredentials cre * @param credentials the management credentials for Azure */ private DataLakeAnalyticsCatalogManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - this(new RestClient.Builder(baseUrl) - .withMapperAdapter(new AzureJacksonMapperAdapter()) + this(new RestClient.Builder() + .withBaseUrl(baseUrl) .withCredentials(credentials) .build()); } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/DataLakeAnalyticsJobManagementClientImpl.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/DataLakeAnalyticsJobManagementClientImpl.java index 97de25676e09..2e488ffa04c5 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/DataLakeAnalyticsJobManagementClientImpl.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/DataLakeAnalyticsJobManagementClientImpl.java @@ -10,9 +10,8 @@ import com.microsoft.azure.AzureServiceClient; import com.microsoft.azure.management.datalake.analytics.DataLakeAnalyticsJobManagementClient; import com.microsoft.azure.management.datalake.analytics.Jobs; -import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; /** * Initializes a new instance of the DataLakeAnalyticsJobManagementClientImpl class. @@ -162,8 +161,8 @@ public DataLakeAnalyticsJobManagementClientImpl(ServiceClientCredentials credent * @param credentials the management credentials for Azure */ private DataLakeAnalyticsJobManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - this(new RestClient.Builder(baseUrl) - .withMapperAdapter(new AzureJacksonMapperAdapter()) + this(new RestClient.Builder() + .withBaseUrl(baseUrl) .withCredentials(credentials) .build()); } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/JobsImpl.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/JobsImpl.java index db891f8ce68d..82f54b57b8cc 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/JobsImpl.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/JobsImpl.java @@ -8,7 +8,6 @@ import retrofit2.Retrofit; import com.microsoft.azure.management.datalake.analytics.Jobs; -import com.microsoft.azure.management.datalake.analytics.DataLakeAnalyticsJobManagementClient; import com.google.common.base.Joiner; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; @@ -49,7 +48,7 @@ public final class JobsImpl implements Jobs { /** The Retrofit service to perform REST calls. */ private JobsService service; /** The service client containing this operation class. */ - private DataLakeAnalyticsJobManagementClient client; + private DataLakeAnalyticsJobManagementClientImpl client; /** * Initializes an instance of JobsImpl. @@ -57,7 +56,7 @@ public final class JobsImpl implements Jobs { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public JobsImpl(Retrofit retrofit, DataLakeAnalyticsJobManagementClient client) { + public JobsImpl(Retrofit retrofit, DataLakeAnalyticsJobManagementClientImpl client) { this.service = retrofit.create(JobsService.class); this.client = client; } @@ -175,7 +174,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getStatisticsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -255,7 +254,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDebugDataPathDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -337,7 +336,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse buildDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -417,7 +416,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse cancelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .build(response); } @@ -496,7 +495,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -587,7 +586,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -786,7 +785,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -849,7 +848,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/package-info.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/package-info.java index 9ce299faeff3..b1e6ac4fe3f5 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/package-info.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/package-info.java @@ -3,7 +3,7 @@ // license information. /** - * This package contains the implementation classes for DataLakeAnalyticsAccountManagementClient. - * Creates an Azure Data Lake Analytics account management client. + * This package contains the implementation classes for DataLakeAnalyticsCatalogManagementClient. + * Creates an Azure Data Lake Analytics catalog client. */ package com.microsoft.azure.management.datalake.analytics.implementation; diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/TypeFieldInfo.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/TypeFieldInfo.java new file mode 100644 index 000000000000..7325bb256b8b --- /dev/null +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/TypeFieldInfo.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. + */ + +package com.microsoft.azure.management.datalake.analytics.models; + + +/** + * A Data Lake Analytics catalog type field information item. + */ +public class TypeFieldInfo { + /** + * the name of the field associated with this type. + */ + private String name; + + /** + * the type of the field. + */ + private String type; + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the TypeFieldInfo object itself. + */ + public TypeFieldInfo withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type value. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the TypeFieldInfo object itself. + */ + public TypeFieldInfo withType(String type) { + this.type = type; + return this; + } + +} diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/USqlTable.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/USqlTable.java index 6d26786e75b9..76045fa425cc 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/USqlTable.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/USqlTable.java @@ -49,6 +49,11 @@ public class USqlTable extends CatalogItem { */ private ExternalTable externalTable; + /** + * the distributions info of the table. + */ + private USqlDistributionInfo distributionInfo; + /** * Get the databaseName value. * @@ -189,4 +194,24 @@ public USqlTable withExternalTable(ExternalTable externalTable) { return this; } + /** + * Get the distributionInfo value. + * + * @return the distributionInfo value + */ + public USqlDistributionInfo distributionInfo() { + return this.distributionInfo; + } + + /** + * Set the distributionInfo value. + * + * @param distributionInfo the distributionInfo value to set + * @return the USqlTable object itself. + */ + public USqlTable withDistributionInfo(USqlDistributionInfo distributionInfo) { + this.distributionInfo = distributionInfo; + return this; + } + } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/USqlTableType.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/USqlTableType.java new file mode 100644 index 000000000000..077a9d5d3e3f --- /dev/null +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/USqlTableType.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. + */ + +package com.microsoft.azure.management.datalake.analytics.models; + + +/** + * A Data Lake Analytics catalog U-SQL table type item. + */ +public class USqlTableType extends USqlType { + /** + * the type field information associated with this table type. + */ + private TypeFieldInfo columns; + + /** + * Get the columns value. + * + * @return the columns value + */ + public TypeFieldInfo columns() { + return this.columns; + } + + /** + * Set the columns value. + * + * @param columns the columns value to set + * @return the USqlTableType object itself. + */ + public USqlTableType withColumns(TypeFieldInfo columns) { + this.columns = columns; + return this; + } + +} diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/package-info.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/package-info.java index 168552ce4c7c..f8cf7404b92b 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/package-info.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/package-info.java @@ -3,7 +3,7 @@ // license information. /** - * This package contains the models classes for DataLakeAnalyticsAccountManagementClient. - * Creates an Azure Data Lake Analytics account management client. + * This package contains the models classes for DataLakeAnalyticsCatalogManagementClient. + * Creates an Azure Data Lake Analytics catalog client. */ package com.microsoft.azure.management.datalake.analytics.models; diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/package-info.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/package-info.java index 81ae82c16959..51109fd0d656 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/package-info.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/package-info.java @@ -3,7 +3,7 @@ // license information. /** - * This package contains the classes for DataLakeAnalyticsAccountManagementClient. - * Creates an Azure Data Lake Analytics account management client. + * This package contains the classes for DataLakeAnalyticsCatalogManagementClient. + * Creates an Azure Data Lake Analytics catalog client. */ package com.microsoft.azure.management.datalake.analytics; diff --git a/azure-mgmt-datalake-analytics/src/test/java/com/microsoft/azure/management/datalake/analytics/DataLakeAnalyticsManagementTestBase.java b/azure-mgmt-datalake-analytics/src/test/java/com/microsoft/azure/management/datalake/analytics/DataLakeAnalyticsManagementTestBase.java index a196fa962e23..6879d0d9df02 100644 --- a/azure-mgmt-datalake-analytics/src/test/java/com/microsoft/azure/management/datalake/analytics/DataLakeAnalyticsManagementTestBase.java +++ b/azure-mgmt-datalake-analytics/src/test/java/com/microsoft/azure/management/datalake/analytics/DataLakeAnalyticsManagementTestBase.java @@ -14,7 +14,7 @@ import com.microsoft.azure.management.resources.implementation.api.ResourceManagementClientImpl; import com.microsoft.azure.management.storage.implementation.api.StorageManagementClientImpl; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; import org.junit.Assert; import java.text.MessageFormat; @@ -71,13 +71,15 @@ public static void createClients() { null, authEnv); - RestClient restClient = new RestClient.Builder(armUri) + RestClient restClient = new RestClient.Builder() + .withBaseUrl(armUri) .withCredentials(credentials) .withLogLevel(HttpLoggingInterceptor.Level.BODY) .build(); dataLakeAnalyticsAccountManagementClient = new DataLakeAnalyticsAccountManagementClientImpl(restClient); dataLakeAnalyticsAccountManagementClient.withSubscriptionId(System.getenv("arm.subscriptionid")); - RestClient restClientWithTimeout = new RestClient.Builder(armUri, new OkHttpClient.Builder().readTimeout(5, TimeUnit.MINUTES), new Retrofit.Builder()) + RestClient restClientWithTimeout = new RestClient.Builder(new OkHttpClient.Builder().readTimeout(5, TimeUnit.MINUTES), new Retrofit.Builder()) + .withBaseUrl(armUri) .withCredentials(credentials) .withLogLevel(HttpLoggingInterceptor.Level.BODY) .build(); @@ -116,8 +118,7 @@ public static void runJobToCompletion(DataLakeAnalyticsJobManagementClientImpl j int maxWaitInSeconds = 2700; // giving it 45 minutes for now. int curWaitInSeconds = 0; - while (getJobResponse.state() != JobState.ENDED && curWaitInSeconds < maxWaitInSeconds) - { + while (getJobResponse.state() != JobState.ENDED && curWaitInSeconds < maxWaitInSeconds) { // wait 5 seconds before polling again Thread.sleep(5000); curWaitInSeconds += 5; @@ -135,7 +136,7 @@ public static void runJobToCompletion(DataLakeAnalyticsJobManagementClientImpl j } public static String generateName(String prefix) { - int randomSuffix = (int)(Math.random() * 1000); + int randomSuffix = (int) (Math.random() * 1000); return prefix + randomSuffix; } } diff --git a/azure-mgmt-datalake-store-uploader/src/test/java/com/microsoft/azure/management/datalake/store/uploader/DataLakeUploaderTestBase.java b/azure-mgmt-datalake-store-uploader/src/test/java/com/microsoft/azure/management/datalake/store/uploader/DataLakeUploaderTestBase.java index 4a52d8cb595d..170ce5da2db8 100644 --- a/azure-mgmt-datalake-store-uploader/src/test/java/com/microsoft/azure/management/datalake/store/uploader/DataLakeUploaderTestBase.java +++ b/azure-mgmt-datalake-store-uploader/src/test/java/com/microsoft/azure/management/datalake/store/uploader/DataLakeUploaderTestBase.java @@ -10,7 +10,7 @@ import com.microsoft.azure.management.datalake.store.implementation.DataLakeStoreAccountManagementClientImpl; import com.microsoft.azure.management.datalake.store.implementation.DataLakeStoreFileSystemManagementClientImpl; import com.microsoft.azure.management.resources.implementation.api.ResourceManagementClientImpl; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; import okhttp3.logging.HttpLoggingInterceptor; public abstract class DataLakeUploaderTestBase { @@ -27,7 +27,8 @@ public static void createClients() { null, AzureEnvironment.AZURE); - RestClient restClient = new RestClient.Builder("https://management.azure.com") + RestClient restClient = new RestClient.Builder() + .withDefaultBaseUrl(AzureEnvironment.AZURE) .withCredentials(credentials) .withLogLevel(HttpLoggingInterceptor.Level.BODY) .build(); @@ -42,7 +43,7 @@ public static void createClients() { } public static String generateName(String prefix) { - int randomSuffix = (int)(Math.random() * 1000); + int randomSuffix = (int) (Math.random() * 1000); return prefix + randomSuffix; } } diff --git a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/DataLakeStoreAccountManagementClient.java b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/DataLakeStoreAccountManagementClient.java index 172653930311..34e494a11065 100644 --- a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/DataLakeStoreAccountManagementClient.java +++ b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/DataLakeStoreAccountManagementClient.java @@ -7,7 +7,7 @@ package com.microsoft.azure.management.datalake.store; import com.microsoft.azure.AzureClient; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; /** * The interface for DataLakeStoreAccountManagementClient class. diff --git a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/DataLakeStoreFileSystemManagementClient.java b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/DataLakeStoreFileSystemManagementClient.java index 33addfba08ce..7df7bc30314b 100644 --- a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/DataLakeStoreFileSystemManagementClient.java +++ b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/DataLakeStoreFileSystemManagementClient.java @@ -7,7 +7,7 @@ package com.microsoft.azure.management.datalake.store; import com.microsoft.azure.AzureClient; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; /** * The interface for DataLakeStoreFileSystemManagementClient class. diff --git a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/AccountsImpl.java b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/AccountsImpl.java index 7a32aa9bc563..7bd1e70e6a37 100644 --- a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/AccountsImpl.java +++ b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/AccountsImpl.java @@ -8,7 +8,6 @@ import retrofit2.Retrofit; import com.microsoft.azure.management.datalake.store.Accounts; -import com.microsoft.azure.management.datalake.store.DataLakeStoreAccountManagementClient; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.CloudException; @@ -48,7 +47,7 @@ public final class AccountsImpl implements Accounts { /** The Retrofit service to perform REST calls. */ private AccountsService service; /** The service client containing this operation class. */ - private DataLakeStoreAccountManagementClient client; + private DataLakeStoreAccountManagementClientImpl client; /** * Initializes an instance of AccountsImpl. @@ -56,7 +55,7 @@ public final class AccountsImpl implements Accounts { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public AccountsImpl(Retrofit retrofit, DataLakeStoreAccountManagementClient client) { + public AccountsImpl(Retrofit retrofit, DataLakeStoreAccountManagementClientImpl client) { this.service = retrofit.create(AccountsService.class); this.client = client; } @@ -213,7 +212,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteFirewallRuleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .build(response); @@ -300,7 +299,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getFirewallRuleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -392,7 +391,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listFirewallRulesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -490,7 +489,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateFirewallRuleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -657,7 +656,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -825,7 +824,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -972,7 +971,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) @@ -1052,7 +1051,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1247,7 +1246,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1424,7 +1423,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1487,7 +1486,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listFirewallRulesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1550,7 +1549,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1613,7 +1612,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/DataLakeStoreAccountManagementClientImpl.java b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/DataLakeStoreAccountManagementClientImpl.java index 24b8a30c9ba9..3ef2503331bf 100644 --- a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/DataLakeStoreAccountManagementClientImpl.java +++ b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/DataLakeStoreAccountManagementClientImpl.java @@ -10,9 +10,8 @@ import com.microsoft.azure.AzureServiceClient; import com.microsoft.azure.management.datalake.store.Accounts; import com.microsoft.azure.management.datalake.store.DataLakeStoreAccountManagementClient; -import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; /** * Initializes a new instance of the DataLakeStoreAccountManagementClientImpl class. @@ -162,8 +161,8 @@ public DataLakeStoreAccountManagementClientImpl(ServiceClientCredentials credent * @param credentials the management credentials for Azure */ public DataLakeStoreAccountManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - this(new RestClient.Builder(baseUrl) - .withMapperAdapter(new AzureJacksonMapperAdapter()) + this(new RestClient.Builder() + .withBaseUrl(baseUrl) .withCredentials(credentials) .build()); } diff --git a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/DataLakeStoreFileSystemManagementClientImpl.java b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/DataLakeStoreFileSystemManagementClientImpl.java index c4ade41349c1..d95a00f78b01 100644 --- a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/DataLakeStoreFileSystemManagementClientImpl.java +++ b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/DataLakeStoreFileSystemManagementClientImpl.java @@ -10,9 +10,8 @@ import com.microsoft.azure.AzureServiceClient; import com.microsoft.azure.management.datalake.store.DataLakeStoreFileSystemManagementClient; import com.microsoft.azure.management.datalake.store.FileSystems; -import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; /** * Initializes a new instance of the DataLakeStoreFileSystemManagementClientImpl class. @@ -162,8 +161,8 @@ public DataLakeStoreFileSystemManagementClientImpl(ServiceClientCredentials cred * @param credentials the management credentials for Azure */ private DataLakeStoreFileSystemManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - this(new RestClient.Builder(baseUrl) - .withMapperAdapter(new AzureJacksonMapperAdapter()) + this(new RestClient.Builder() + .withBaseUrl(baseUrl) .withCredentials(credentials) .build()); } diff --git a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/FileSystemsImpl.java b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/FileSystemsImpl.java index 87503c06397e..08a5e5a35459 100644 --- a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/FileSystemsImpl.java +++ b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/FileSystemsImpl.java @@ -8,7 +8,6 @@ import retrofit2.Retrofit; import com.microsoft.azure.management.datalake.store.FileSystems; -import com.microsoft.azure.management.datalake.store.DataLakeStoreFileSystemManagementClient; import com.google.common.base.Joiner; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; @@ -52,7 +51,7 @@ public final class FileSystemsImpl implements FileSystems { /** The Retrofit service to perform REST calls. */ private FileSystemsService service; /** The service client containing this operation class. */ - private DataLakeStoreFileSystemManagementClient client; + private DataLakeStoreFileSystemManagementClientImpl client; /** * Initializes an instance of FileSystemsImpl. @@ -60,7 +59,7 @@ public final class FileSystemsImpl implements FileSystems { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public FileSystemsImpl(Retrofit retrofit, DataLakeStoreFileSystemManagementClient client) { + public FileSystemsImpl(Retrofit retrofit, DataLakeStoreFileSystemManagementClientImpl client) { this.service = retrofit.create(FileSystemsService.class); this.client = client; } @@ -330,7 +329,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse concurrentAppendDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -491,7 +490,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse checkAccessDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -573,7 +572,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse mkdirsDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -609,7 +608,7 @@ public ServiceResponse concat(String accountName, String destinationPath, Validator.validate(sources); final String op = "CONCAT"; String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlsFileSystemDnsSuffix}", this.client.adlsFileSystemDnsSuffix()); - String sourcesConverted = this.client.restClient().mapperAdapter().serializeList(sources, CollectionFormat.CSV); + String sourcesConverted = this.client.mapperAdapter().serializeList(sources, CollectionFormat.CSV); Call call = service.concat(destinationPath, sourcesConverted, op, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()); return concatDelegate(call.execute()); } @@ -651,7 +650,7 @@ public ServiceCall concatAsync(String accountName, String destinationPath, List< Validator.validate(sources, serviceCallback); final String op = "CONCAT"; String parameterizedHost = Joiner.on(", ").join("{accountName}", accountName, "{adlsFileSystemDnsSuffix}", this.client.adlsFileSystemDnsSuffix()); - String sourcesConverted = this.client.restClient().mapperAdapter().serializeList(sources, CollectionFormat.CSV); + String sourcesConverted = this.client.mapperAdapter().serializeList(sources, CollectionFormat.CSV); Call call = service.concat(destinationPath, sourcesConverted, op, this.client.apiVersion(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -668,7 +667,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse concatDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -851,7 +850,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse msConcatDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -1020,7 +1019,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listFileStatusDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -1102,7 +1101,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getContentSummaryDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -1184,7 +1183,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getFileStatusDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -1281,7 +1280,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse appendDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -1470,7 +1469,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -1639,7 +1638,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse openDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -1730,7 +1729,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse setAclDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -1821,7 +1820,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse modifyAclEntriesDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -1912,7 +1911,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse removeAclEntriesDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -1994,7 +1993,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getAclStatusDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -2155,7 +2154,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -2246,7 +2245,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse renameDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -2411,7 +2410,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse setOwnerDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); @@ -2572,7 +2571,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse setPermissionDelegate(Response response) throws AdlsErrorException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(AdlsErrorException.class) .build(response); diff --git a/azure-mgmt-datalake-store/src/test/java/com/microsoft/azure/management/datalake/store/DataLakeStoreManagementTestBase.java b/azure-mgmt-datalake-store/src/test/java/com/microsoft/azure/management/datalake/store/DataLakeStoreManagementTestBase.java index 310b652dbf0d..6af2353d2c21 100644 --- a/azure-mgmt-datalake-store/src/test/java/com/microsoft/azure/management/datalake/store/DataLakeStoreManagementTestBase.java +++ b/azure-mgmt-datalake-store/src/test/java/com/microsoft/azure/management/datalake/store/DataLakeStoreManagementTestBase.java @@ -5,7 +5,7 @@ import com.microsoft.azure.management.datalake.store.implementation.DataLakeStoreAccountManagementClientImpl; import com.microsoft.azure.management.datalake.store.implementation.DataLakeStoreFileSystemManagementClientImpl; import com.microsoft.azure.management.resources.implementation.api.ResourceManagementClientImpl; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; import okhttp3.logging.HttpLoggingInterceptor; public abstract class DataLakeStoreManagementTestBase { @@ -22,7 +22,8 @@ public static void createClients() { null, AzureEnvironment.AZURE); - RestClient restClient = new RestClient.Builder("https://management.azure.com") + RestClient restClient = new RestClient.Builder() + .withDefaultBaseUrl(com.microsoft.azure.AzureEnvironment.AZURE) .withCredentials(credentials) .withLogLevel(HttpLoggingInterceptor.Level.BODY) .build(); @@ -37,7 +38,7 @@ public static void createClients() { } public static String generateName(String prefix) { - int randomSuffix = (int)(Math.random() * 1000); + int randomSuffix = (int) (Math.random() * 1000); return prefix + randomSuffix; } } \ No newline at end of file diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManager.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManager.java index 6e7799be4959..5fd53c1df909 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManager.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManager.java @@ -14,7 +14,7 @@ import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; import com.microsoft.azure.management.resources.fluentcore.arm.implementation.AzureConfigurableImpl; import com.microsoft.azure.management.resources.fluentcore.arm.implementation.Manager; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; /** diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ApplicationGatewaysInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ApplicationGatewaysInner.java index 54210c7682ed..4307a0b53096 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ApplicationGatewaysInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ApplicationGatewaysInner.java @@ -255,7 +255,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) @@ -334,7 +334,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -501,7 +501,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -585,7 +585,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -659,7 +659,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -805,7 +805,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .build(response); @@ -951,7 +951,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginStopDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .build(response); @@ -1014,7 +1014,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1077,7 +1077,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ExpressRouteCircuitAuthorizationsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ExpressRouteCircuitAuthorizationsInner.java index 26d98f066c16..c5b204dd192d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ExpressRouteCircuitAuthorizationsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ExpressRouteCircuitAuthorizationsInner.java @@ -247,7 +247,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) @@ -335,7 +335,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -519,7 +519,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -612,7 +612,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -675,7 +675,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ExpressRouteCircuitPeeringsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ExpressRouteCircuitPeeringsInner.java index 260894a0306e..bd1370136a57 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ExpressRouteCircuitPeeringsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ExpressRouteCircuitPeeringsInner.java @@ -247,7 +247,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) @@ -335,7 +335,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -519,7 +519,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -612,7 +612,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -675,7 +675,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ExpressRouteCircuitsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ExpressRouteCircuitsInner.java index 242d15b1bb8e..581b2507d847 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ExpressRouteCircuitsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ExpressRouteCircuitsInner.java @@ -262,7 +262,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) @@ -341,7 +341,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -508,7 +508,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -601,7 +601,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listArpTableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -693,7 +693,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listRoutesTableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -785,7 +785,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listStatsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -868,7 +868,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -942,7 +942,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1005,7 +1005,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listArpTableNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1068,7 +1068,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listRoutesTableNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1131,7 +1131,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listStatsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1194,7 +1194,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1257,7 +1257,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ExpressRouteServiceProvidersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ExpressRouteServiceProvidersInner.java index fb8397feeb59..f399e59800ae 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ExpressRouteServiceProvidersInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/ExpressRouteServiceProvidersInner.java @@ -132,7 +132,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -195,7 +195,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/LoadBalancersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/LoadBalancersInner.java index 889d00cb6f62..de72c2f64982 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/LoadBalancersInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/LoadBalancersInner.java @@ -238,7 +238,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) @@ -392,7 +392,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -559,7 +559,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -634,7 +634,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -717,7 +717,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -780,7 +780,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -843,7 +843,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/LocalNetworkGatewaysInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/LocalNetworkGatewaysInner.java index b78a3adea4ff..700a08706162 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/LocalNetworkGatewaysInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/LocalNetworkGatewaysInner.java @@ -251,7 +251,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -330,7 +330,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -476,7 +476,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) @@ -560,7 +560,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -623,7 +623,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkInterfacesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkInterfacesInner.java index 84557539d649..0b829458d9b6 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkInterfacesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkInterfacesInner.java @@ -258,7 +258,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) @@ -412,7 +412,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -579,7 +579,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -681,7 +681,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listVirtualMachineScaleSetVMNetworkInterfacesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -773,7 +773,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listVirtualMachineScaleSetNetworkInterfacesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -962,7 +962,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getVirtualMachineScaleSetNetworkInterfaceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1036,7 +1036,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1119,7 +1119,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1182,7 +1182,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listVirtualMachineScaleSetVMNetworkInterfacesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1245,7 +1245,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listVirtualMachineScaleSetNetworkInterfacesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1308,7 +1308,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1371,7 +1371,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkManagementClientImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkManagementClientImpl.java index 9e70b059eeab..135f0c39cd66 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkManagementClientImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkManagementClientImpl.java @@ -11,9 +11,8 @@ import com.microsoft.azure.AzureServiceClient; import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.CloudException; -import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -61,9 +60,11 @@ public String subscriptionId() { * Sets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. * * @param subscriptionId the subscriptionId value. + * @return the service client itself */ - public void withSubscriptionId(String subscriptionId) { + public NetworkManagementClientImpl withSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; + return this; } /** Client Api Version. */ @@ -94,9 +95,11 @@ public String acceptLanguage() { * Sets Gets or sets the preferred language for the response. * * @param acceptLanguage the acceptLanguage value. + * @return the service client itself */ - public void withAcceptLanguage(String acceptLanguage) { + public NetworkManagementClientImpl withAcceptLanguage(String acceptLanguage) { this.acceptLanguage = acceptLanguage; + return this; } /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ @@ -115,9 +118,11 @@ public int longRunningOperationRetryTimeout() { * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. * * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself */ - public void withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + public NetworkManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; } /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ @@ -136,9 +141,11 @@ public boolean generateClientRequestId() { * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself */ - public void withGenerateClientRequestId(boolean generateClientRequestId) { + public NetworkManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { this.generateClientRequestId = generateClientRequestId; + return this; } /** @@ -391,8 +398,8 @@ public NetworkManagementClientImpl(ServiceClientCredentials credentials) { * @param credentials the management credentials for Azure */ public NetworkManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - this(new RestClient.Builder(baseUrl) - .withMapperAdapter(new AzureJacksonMapperAdapter()) + this(new RestClient.Builder() + .withBaseUrl(baseUrl) .withCredentials(credentials) .build()); } @@ -590,7 +597,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse checkDnsNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkSecurityGroupsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkSecurityGroupsInner.java index ca9e6642c5a1..a4ddc0f0e1a9 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkSecurityGroupsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkSecurityGroupsInner.java @@ -238,7 +238,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) @@ -392,7 +392,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -559,7 +559,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -634,7 +634,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -717,7 +717,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -780,7 +780,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -843,7 +843,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/PublicIPAddressesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/PublicIPAddressesInner.java index a9cc16ede166..0b4ed7ace17d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/PublicIPAddressesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/PublicIPAddressesInner.java @@ -238,7 +238,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) @@ -392,7 +392,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -559,7 +559,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -634,7 +634,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -717,7 +717,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -780,7 +780,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -843,7 +843,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/RouteTablesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/RouteTablesInner.java index 79d342fb3b63..d67950020ae0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/RouteTablesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/RouteTablesInner.java @@ -238,7 +238,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) @@ -392,7 +392,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -559,7 +559,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -643,7 +643,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -717,7 +717,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -780,7 +780,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -843,7 +843,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/RoutesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/RoutesInner.java index 5fbc79d70a91..fe4ea3fcce79 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/RoutesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/RoutesInner.java @@ -247,7 +247,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) @@ -335,7 +335,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -519,7 +519,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -612,7 +612,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -675,7 +675,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/SecurityRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/SecurityRulesInner.java index fe481897ec0b..2200857a492e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/SecurityRulesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/SecurityRulesInner.java @@ -247,7 +247,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) @@ -335,7 +335,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -519,7 +519,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -612,7 +612,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -675,7 +675,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/SubnetsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/SubnetsInner.java index edc200354080..6b172db2ab8e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/SubnetsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/SubnetsInner.java @@ -247,7 +247,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) @@ -419,7 +419,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -603,7 +603,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -696,7 +696,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -759,7 +759,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/UsagesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/UsagesInner.java index ac89d35f62db..2414ae7dddc8 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/UsagesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/UsagesInner.java @@ -141,7 +141,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -204,7 +204,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/VirtualNetworkGatewayConnectionsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/VirtualNetworkGatewayConnectionsInner.java index f205bfd16dd3..34bc97cf25de 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/VirtualNetworkGatewayConnectionsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/VirtualNetworkGatewayConnectionsInner.java @@ -272,7 +272,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -351,7 +351,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -497,7 +497,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) @@ -576,7 +576,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSharedKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -659,7 +659,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -967,7 +967,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginResetSharedKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1276,7 +1276,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginSetSharedKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1340,7 +1340,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/VirtualNetworkGatewaysInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/VirtualNetworkGatewaysInner.java index a3708c7572cc..d786ab2a0f76 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/VirtualNetworkGatewaysInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/VirtualNetworkGatewaysInner.java @@ -264,7 +264,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -343,7 +343,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -489,7 +489,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) @@ -573,7 +573,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -740,7 +740,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginResetDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -902,7 +902,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse generatevpnclientpackageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -965,7 +965,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/VirtualNetworksInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/VirtualNetworksInner.java index 765aefb5de3f..1cae204b9942 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/VirtualNetworksInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/VirtualNetworksInner.java @@ -238,7 +238,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) @@ -392,7 +392,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -559,7 +559,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -634,7 +634,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -717,7 +717,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -780,7 +780,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -843,7 +843,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceConnector.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceConnector.java index eb9737a7ea9b..89156df30a62 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceConnector.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceConnector.java @@ -6,7 +6,7 @@ package com.microsoft.azure.management.resources; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; /** * Defines a connector that connects other resources to a resource group. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/implementation/AzureConfigurableImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/implementation/AzureConfigurableImpl.java index 31966a22e625..947c7654bd2b 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/implementation/AzureConfigurableImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/implementation/AzureConfigurableImpl.java @@ -8,7 +8,7 @@ import com.microsoft.azure.AzureEnvironment; import com.microsoft.azure.management.resources.fluentcore.arm.AzureConfigurable; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; import okhttp3.Interceptor; import okhttp3.logging.HttpLoggingInterceptor; @@ -21,7 +21,7 @@ */ public class AzureConfigurableImpl> implements AzureConfigurable { - private RestClient.Builder restClientBuilder; + private RestClient.Builder.Buildable restClientBuilder; protected AzureConfigurableImpl() { this.restClientBuilder = AzureEnvironment.AZURE.newRestClientBuilder(); diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/implementation/Manager.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/implementation/Manager.java index 585886b53927..21f2f2c7122f 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/implementation/Manager.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/implementation/Manager.java @@ -7,7 +7,7 @@ package com.microsoft.azure.management.resources.fluentcore.arm.implementation; import com.microsoft.azure.management.resources.implementation.ResourceManager; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; /** * Base class for Azure resource managers. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceManager.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceManager.java index cea799bac9c3..18c3117ab79e 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceManager.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceManager.java @@ -19,7 +19,7 @@ import com.microsoft.azure.management.resources.implementation.api.FeatureClientImpl; import com.microsoft.azure.management.resources.implementation.api.ResourceManagementClientImpl; import com.microsoft.azure.management.resources.implementation.api.SubscriptionClientImpl; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; /** diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionImpl.java index 1a87a3eaef4a..41d496b99466 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionImpl.java @@ -7,17 +7,21 @@ package com.microsoft.azure.management.resources.implementation; import com.microsoft.azure.CloudException; +import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.Location; import com.microsoft.azure.management.resources.Subscription; import com.microsoft.azure.management.resources.fluentcore.model.implementation.IndexableWrapperImpl; import com.microsoft.azure.management.resources.fluentcore.utils.PagedListConverter; import com.microsoft.azure.management.resources.implementation.api.LocationInner; +import com.microsoft.azure.management.resources.implementation.api.PageImpl; import com.microsoft.azure.management.resources.implementation.api.SubscriptionInner; import com.microsoft.azure.management.resources.implementation.api.SubscriptionPolicies; import com.microsoft.azure.management.resources.implementation.api.SubscriptionsInner; +import com.microsoft.rest.RestException; import java.io.IOException; +import java.util.List; /** * The implementation of Subscription and its nested interfaces. @@ -62,6 +66,18 @@ public Location typeConvert(LocationInner locationInner) { return new LocationImpl(locationInner); } }; - return converter.convert(client.listLocations(this.subscriptionId()).getBody()); + return converter.convert(toPagedList(client.listLocations(this.subscriptionId()).getBody())); + } + + private PagedList toPagedList(List list) { + PageImpl page = new PageImpl<>(); + page.setItems(list); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) throws RestException, IOException { + return null; + } + }; } } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/DeploymentOperationsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/DeploymentOperationsInner.java index bede82d2529a..1f144a773478 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/DeploymentOperationsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/DeploymentOperationsInner.java @@ -150,7 +150,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -331,7 +331,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -394,7 +394,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/DeploymentsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/DeploymentsInner.java index 8bd10dcbbfcf..c73773d7febc 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/DeploymentsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/DeploymentsInner.java @@ -249,7 +249,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .build(response); @@ -327,7 +327,7 @@ public void onResponse(Call call, Response response) { } private ServiceResponse checkExistenceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -495,7 +495,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -574,7 +574,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -652,7 +652,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse cancelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .build(response); } @@ -740,7 +740,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse validateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(400, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -819,7 +819,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse exportTemplateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -986,7 +986,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1049,7 +1049,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/FeatureClientImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/FeatureClientImpl.java index b52b488229a8..c40ac1f5ea55 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/FeatureClientImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/FeatureClientImpl.java @@ -8,9 +8,8 @@ import com.microsoft.azure.AzureClient; import com.microsoft.azure.AzureServiceClient; -import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; /** * Initializes a new instance of the FeatureClientImpl class. @@ -160,8 +159,8 @@ public FeatureClientImpl(ServiceClientCredentials credentials) { * @param credentials the management credentials for Azure */ public FeatureClientImpl(String baseUrl, ServiceClientCredentials credentials) { - this(new RestClient.Builder(baseUrl) - .withMapperAdapter(new AzureJacksonMapperAdapter()) + this(new RestClient.Builder() + .withBaseUrl(baseUrl) .withCredentials(credentials) .build()); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/FeaturesInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/FeaturesInner.java index d1118191bb8d..10c2a7531398 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/FeaturesInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/FeaturesInner.java @@ -150,7 +150,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -233,7 +233,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -311,7 +311,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -389,7 +389,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse registerDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -452,7 +452,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -515,7 +515,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/PageImpl1.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/PageImpl1.java new file mode 100644 index 000000000000..f98915e6d748 --- /dev/null +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/PageImpl1.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. + */ + +package com.microsoft.azure.management.resources.implementation.api; + +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 getNextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List getItems() { + 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/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ProvidersInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ProvidersInner.java index 18b370f23f7e..e1a397e3df2f 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ProvidersInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ProvidersInner.java @@ -141,7 +141,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse unregisterDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -210,7 +210,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse registerDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -355,7 +355,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -424,7 +424,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -487,7 +487,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourceGroupsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourceGroupsInner.java index 791464262b0e..f966c0014b41 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourceGroupsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourceGroupsInner.java @@ -271,7 +271,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listResourcesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -340,7 +340,7 @@ public void onResponse(Call call, Response response) { } private ServiceResponse checkExistenceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -421,7 +421,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -551,7 +551,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .build(response); @@ -620,7 +620,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -700,7 +700,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse patchDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -780,7 +780,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse exportTemplateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -929,7 +929,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -992,7 +992,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listResourcesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1055,7 +1055,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourceManagementClientImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourceManagementClientImpl.java index 62e5e9adcf1a..d72160dccd2d 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourceManagementClientImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourceManagementClientImpl.java @@ -8,9 +8,8 @@ import com.microsoft.azure.AzureClient; import com.microsoft.azure.AzureServiceClient; -import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; /** * Initializes a new instance of the ResourceManagementClientImpl class. @@ -209,19 +208,6 @@ public DeploymentOperationsInner deploymentOperations() { return this.deploymentOperations; } - /** - * The ResourceProviderOperationDetailsInner object to access its operations. - */ - private ResourceProviderOperationDetailsInner resourceProviderOperationDetails; - - /** - * Gets the ResourceProviderOperationDetailsInner object to access its operations. - * @return the ResourceProviderOperationDetailsInner object. - */ - public ResourceProviderOperationDetailsInner resourceProviderOperationDetails() { - return this.resourceProviderOperationDetails; - } - /** * Initializes an instance of ResourceManagementClient client. * @@ -238,8 +224,8 @@ public ResourceManagementClientImpl(ServiceClientCredentials credentials) { * @param credentials the management credentials for Azure */ public ResourceManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - this(new RestClient.Builder(baseUrl) - .withMapperAdapter(new AzureJacksonMapperAdapter()) + this(new RestClient.Builder() + .withBaseUrl(baseUrl) .withCredentials(credentials) .build()); } @@ -265,7 +251,6 @@ protected void initialize() { this.resources = new ResourcesInner(restClient().retrofit(), this); this.tags = new TagsInner(restClient().retrofit(), this); this.deploymentOperations = new DeploymentOperationsInner(restClient().retrofit(), this); - this.resourceProviderOperationDetails = new ResourceProviderOperationDetailsInner(restClient().retrofit(), this); this.azureClient = new AzureClient(this); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourceProviderOperationDefinitionInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourceProviderOperationDefinitionInner.java deleted file mode 100644 index 4a73aa5134d4..000000000000 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourceProviderOperationDefinitionInner.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -package com.microsoft.azure.management.resources.implementation.api; - - -/** - * Resource provider operation information. - */ -public class ResourceProviderOperationDefinitionInner { - /** - * Gets or sets the provider operation name. - */ - private String name; - - /** - * Gets or sets the display property of the provider operation. - */ - private ResourceProviderOperationDisplayProperties display; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ResourceProviderOperationDefinitionInner object itself. - */ - public ResourceProviderOperationDefinitionInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display value. - * - * @return the display value - */ - public ResourceProviderOperationDisplayProperties display() { - return this.display; - } - - /** - * Set the display value. - * - * @param display the display value to set - * @return the ResourceProviderOperationDefinitionInner object itself. - */ - public ResourceProviderOperationDefinitionInner withDisplay(ResourceProviderOperationDisplayProperties display) { - this.display = display; - return this; - } - -} diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourceProviderOperationDetailsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourceProviderOperationDetailsInner.java deleted file mode 100644 index 4ee83319eed4..000000000000 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourceProviderOperationDetailsInner.java +++ /dev/null @@ -1,217 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - */ - -package com.microsoft.azure.management.resources.implementation.api; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceResponseBuilder; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCall; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.ServiceResponseCallback; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.Call; -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; - -/** - * An instance of this class provides access to all the operations defined - * in ResourceProviderOperationDetails. - */ -public final class ResourceProviderOperationDetailsInner { - /** The Retrofit service to perform REST calls. */ - private ResourceProviderOperationDetailsService service; - /** The service client containing this operation class. */ - private ResourceManagementClientImpl client; - - /** - * Initializes an instance of ResourceProviderOperationDetailsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ResourceProviderOperationDetailsInner(Retrofit retrofit, ResourceManagementClientImpl client) { - this.service = retrofit.create(ResourceProviderOperationDetailsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ResourceProviderOperationDetails to be - * used by Retrofit to perform actually REST calls. - */ - interface ResourceProviderOperationDetailsService { - @Headers("Content-Type: application/json; charset=utf-8") - @GET("providers/{resourceProviderNamespace}/operations") - Call list(@Path("resourceProviderNamespace") String resourceProviderNamespace, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET - Call listNext(@Url String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets a list of resource providers. - * - * @param resourceProviderNamespace Resource identity. - * @param apiVersion the String value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @return the List<ResourceProviderOperationDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public ServiceResponse> list(final String resourceProviderNamespace, final String apiVersion) throws CloudException, IOException, IllegalArgumentException { - if (resourceProviderNamespace == null) { - throw new IllegalArgumentException("Parameter resourceProviderNamespace 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 (apiVersion == null) { - throw new IllegalArgumentException("Parameter apiVersion is required and cannot be null."); - } - Call call = service.list(resourceProviderNamespace, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - ServiceResponse> response = listDelegate(call.execute()); - PagedList result = new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) throws CloudException, IOException { - return listNext(nextPageLink).getBody(); - } - }; - return new ServiceResponse<>(result, response.getResponse()); - } - - /** - * Gets a list of resource providers. - * - * @param resourceProviderNamespace Resource identity. - * @param apiVersion the String value - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link Call} object - */ - public ServiceCall listAsync(final String resourceProviderNamespace, final String apiVersion, final ListOperationCallback serviceCallback) throws IllegalArgumentException { - if (serviceCallback == null) { - throw new IllegalArgumentException("ServiceCallback is required for async calls."); - } - if (resourceProviderNamespace == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter resourceProviderNamespace is required and cannot be null.")); - return null; - } - if (this.client.subscriptionId() == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.")); - return null; - } - if (apiVersion == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter apiVersion is required and cannot be null.")); - return null; - } - Call call = service.list(resourceProviderNamespace, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback>(serviceCallback) { - @Override - public void onResponse(Call call, Response response) { - try { - ServiceResponse> result = listDelegate(response); - serviceCallback.load(result.getBody().getItems()); - if (result.getBody().getNextPageLink() != null - && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { - listNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); - } else { - serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); - } - } catch (CloudException | IOException exception) { - serviceCallback.failure(exception); - } - } - }); - return serviceCall; - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(204, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of resource providers. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @return the List<ResourceProviderOperationDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public ServiceResponse> listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - Call call = service.listNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()); - return listNextDelegate(call.execute()); - } - - /** - * Gets a list of resource providers. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link Call} object - */ - public ServiceCall listNextAsync(final String nextPageLink, final ServiceCall serviceCall, final ListOperationCallback serviceCallback) throws IllegalArgumentException { - if (serviceCallback == null) { - throw new IllegalArgumentException("ServiceCallback is required for async calls."); - } - if (nextPageLink == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.")); - return null; - } - Call call = service.listNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()); - serviceCall.newCall(call); - call.enqueue(new ServiceResponseCallback>(serviceCallback) { - @Override - public void onResponse(Call call, Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - serviceCallback.load(result.getBody().getItems()); - if (result.getBody().getNextPageLink() != null - && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { - listNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); - } else { - serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); - } - } catch (CloudException | IOException exception) { - serviceCallback.failure(exception); - } - } - }); - return serviceCall; - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(204, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourcesInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourcesInner.java index aded2f68a9a0..942a2f0bc2d1 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourcesInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/ResourcesInner.java @@ -241,7 +241,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginMoveResourcesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .build(response); @@ -390,7 +390,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -497,7 +497,7 @@ public void onResponse(Call call, Response response) { } private ServiceResponse checkExistenceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -605,7 +605,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) @@ -724,7 +724,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -832,7 +832,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -895,7 +895,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/SubscriptionClientImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/SubscriptionClientImpl.java index 4117483a61af..88d5c5ecaf4c 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/SubscriptionClientImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/SubscriptionClientImpl.java @@ -8,9 +8,8 @@ import com.microsoft.azure.AzureClient; import com.microsoft.azure.AzureServiceClient; -import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; /** * Initializes a new instance of the SubscriptionClientImpl class. @@ -150,8 +149,8 @@ public SubscriptionClientImpl(ServiceClientCredentials credentials) { * @param credentials the management credentials for Azure */ public SubscriptionClientImpl(String baseUrl, ServiceClientCredentials credentials) { - this(new RestClient.Builder(baseUrl) - .withMapperAdapter(new AzureJacksonMapperAdapter()) + this(new RestClient.Builder() + .withBaseUrl(baseUrl) .withCredentials(credentials) .build()); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/SubscriptionsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/SubscriptionsInner.java index 80a87ee2fa6e..38eb6f9c9f46 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/SubscriptionsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/SubscriptionsInner.java @@ -67,10 +67,6 @@ interface SubscriptionsService { @GET("subscriptions") Call list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers("Content-Type: application/json; charset=utf-8") - @GET - Call listLocationsNext(@Url String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers("Content-Type: application/json; charset=utf-8") @GET Call listNext(@Url String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -86,7 +82,7 @@ interface SubscriptionsService { * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<LocationInner> object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse> listLocations(final String subscriptionId) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse> listLocations(String subscriptionId) throws CloudException, IOException, IllegalArgumentException { if (subscriptionId == null) { throw new IllegalArgumentException("Parameter subscriptionId is required and cannot be null."); } @@ -95,12 +91,7 @@ public ServiceResponse> listLocations(final String subs } Call call = service.listLocations(subscriptionId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); ServiceResponse> response = listLocationsDelegate(call.execute()); - PagedList result = new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) throws CloudException, IOException { - return listLocationsNext(nextPageLink).getBody(); - } - }; + List result = response.getBody().getItems(); return new ServiceResponse<>(result, response.getResponse()); } @@ -112,7 +103,7 @@ public Page nextPage(String nextPageLink) throws CloudException, * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall listLocationsAsync(final String subscriptionId, final ListOperationCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall listLocationsAsync(String subscriptionId, final ServiceCallback> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -131,13 +122,7 @@ public ServiceCall listLocationsAsync(final String subscriptionId, final ListOpe public void onResponse(Call call, Response response) { try { ServiceResponse> result = listLocationsDelegate(response); - serviceCallback.load(result.getBody().getItems()); - if (result.getBody().getNextPageLink() != null - && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { - listLocationsNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); - } else { - serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); - } + serviceCallback.success(new ServiceResponse<>(result.getBody().getItems(), result.getResponse())); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -147,7 +132,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listLocationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -209,7 +194,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -228,7 +213,7 @@ public ServiceResponse> list() throws CloudExceptio throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Call call = service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - ServiceResponse> response = listDelegate(call.execute()); + ServiceResponse> response = listDelegate(call.execute()); PagedList result = new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) throws CloudException, IOException { @@ -259,7 +244,7 @@ public ServiceCall listAsync(final ListOperationCallback serv @Override public void onResponse(Call call, Response response) { try { - ServiceResponse> result = listDelegate(response); + ServiceResponse> result = listDelegate(response); serviceCallback.load(result.getBody().getItems()); if (result.getBody().getNextPageLink() != null && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { @@ -275,72 +260,9 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of the subscription locations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @return the List<LocationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public ServiceResponse> listLocationsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - Call call = service.listLocationsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()); - return listLocationsNextDelegate(call.execute()); - } - - /** - * Gets a list of the subscription locations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link Call} object - */ - public ServiceCall listLocationsNextAsync(final String nextPageLink, final ServiceCall serviceCall, final ListOperationCallback serviceCallback) throws IllegalArgumentException { - if (serviceCallback == null) { - throw new IllegalArgumentException("ServiceCallback is required for async calls."); - } - if (nextPageLink == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.")); - return null; - } - Call call = service.listLocationsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()); - serviceCall.newCall(call); - call.enqueue(new ServiceResponseCallback>(serviceCallback) { - @Override - public void onResponse(Call call, Response response) { - try { - ServiceResponse> result = listLocationsNextDelegate(response); - serviceCallback.load(result.getBody().getItems()); - if (result.getBody().getNextPageLink() != null - && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { - listLocationsNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); - } else { - serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); - } - } catch (CloudException | IOException exception) { - serviceCallback.failure(exception); - } - } - }); - return serviceCall; - } - - private ServiceResponse> listLocationsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -354,7 +276,7 @@ private ServiceResponse> listLocationsNextDelegate(Respo * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<SubscriptionInner> object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse> listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse> listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } @@ -385,7 +307,7 @@ public ServiceCall listNextAsync(final String nextPageLink, final ServiceCall se @Override public void onResponse(Call call, Response response) { try { - ServiceResponse> result = listNextDelegate(response); + ServiceResponse> result = listNextDelegate(response); serviceCallback.load(result.getBody().getItems()); if (result.getBody().getNextPageLink() != null && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { @@ -401,9 +323,9 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/TagsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/TagsInner.java index 97433b04654a..42ae6bbaff0c 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/TagsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/TagsInner.java @@ -155,7 +155,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteValueDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .build(response); @@ -233,7 +233,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateValueDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -303,7 +303,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -373,7 +373,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .build(response); @@ -447,7 +447,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -510,7 +510,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/TenantsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/TenantsInner.java index 0fc5a59917fd..7fdc1c24abbb 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/TenantsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/TenantsInner.java @@ -76,7 +76,7 @@ public ServiceResponse> list() throws CloudE throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Call call = service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - ServiceResponse> response = listDelegate(call.execute()); + ServiceResponse> response = listDelegate(call.execute()); PagedList result = new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) throws CloudException, IOException { @@ -107,7 +107,7 @@ public ServiceCall listAsync(final ListOperationCallback call, Response response) { try { - ServiceResponse> result = listDelegate(response); + ServiceResponse> result = listDelegate(response); serviceCallback.load(result.getBody().getItems()); if (result.getBody().getNextPageLink() != null && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { @@ -123,9 +123,9 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -139,7 +139,7 @@ private ServiceResponse> listDelegate(Respons * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<TenantIdDescriptionInner> object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse> listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse> listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } @@ -170,7 +170,7 @@ public ServiceCall listNextAsync(final String nextPageLink, final ServiceCall se @Override public void onResponse(Call call, Response response) { try { - ServiceResponse> result = listNextDelegate(response); + ServiceResponse> result = listNextDelegate(response); serviceCallback.load(result.getBody().getItems()); if (result.getBody().getNextPageLink() != null && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { @@ -186,9 +186,9 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageManager.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageManager.java index 2011fd965820..de87150b744a 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageManager.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageManager.java @@ -13,7 +13,7 @@ import com.microsoft.azure.management.storage.StorageAccounts; import com.microsoft.azure.management.storage.Usages; import com.microsoft.azure.management.storage.implementation.api.StorageManagementClientImpl; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; /** diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/StorageAccountsInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/StorageAccountsInner.java index e27c4a4ca440..f76e3ef7d83c 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/StorageAccountsInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/StorageAccountsInner.java @@ -167,7 +167,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse checkNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -334,7 +334,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -413,7 +413,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .build(response); @@ -491,7 +491,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getPropertiesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -580,7 +580,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -643,7 +643,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -715,7 +715,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -793,7 +793,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -884,7 +884,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse regenerateKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/StorageManagementClientImpl.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/StorageManagementClientImpl.java index d64f48eb99d9..85956615e724 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/StorageManagementClientImpl.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/StorageManagementClientImpl.java @@ -8,9 +8,8 @@ import com.microsoft.azure.AzureClient; import com.microsoft.azure.AzureServiceClient; -import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; /** * Initializes a new instance of the StorageManagementClientImpl class. @@ -173,8 +172,8 @@ public StorageManagementClientImpl(ServiceClientCredentials credentials) { * @param credentials the management credentials for Azure */ public StorageManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - this(new RestClient.Builder(baseUrl) - .withMapperAdapter(new AzureJacksonMapperAdapter()) + this(new RestClient.Builder() + .withBaseUrl(baseUrl) .withCredentials(credentials) .build()); } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/UsagesInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/UsagesInner.java index 2d6f0c0a45ee..ff72572613be 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/UsagesInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/UsagesInner.java @@ -110,7 +110,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-storage/src/test/java/com/microsoft/azure/management/storage/StorageManagementTestBase.java b/azure-mgmt-storage/src/test/java/com/microsoft/azure/management/storage/StorageManagementTestBase.java index 1689338f49de..f4b84f344327 100644 --- a/azure-mgmt-storage/src/test/java/com/microsoft/azure/management/storage/StorageManagementTestBase.java +++ b/azure-mgmt-storage/src/test/java/com/microsoft/azure/management/storage/StorageManagementTestBase.java @@ -10,7 +10,7 @@ import com.microsoft.azure.credentials.ApplicationTokenCredentials; import com.microsoft.azure.management.resources.implementation.ResourceManager; import com.microsoft.azure.management.storage.implementation.StorageManager; -import com.microsoft.rest.RestClient; +import com.microsoft.azure.RestClient; import okhttp3.logging.HttpLoggingInterceptor; /** diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrdersInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrdersInner.java index 3282220eb5e0..f5cf65890544 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrdersInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrdersInner.java @@ -204,7 +204,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -302,7 +302,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -389,7 +389,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -487,7 +487,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -565,7 +565,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getCertificateOrderDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -654,7 +654,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateCertificateOrderDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -732,7 +732,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteCertificateOrderDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -821,7 +821,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateCertificateOrderDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -890,7 +890,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getCertificateOrdersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -968,7 +968,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getCertificatesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1057,7 +1057,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse reissueCertificateOrderDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1146,7 +1146,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse renewCertificateOrderDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1224,7 +1224,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> retrieveCertificateActionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1302,7 +1302,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> retrieveCertificateEmailHistoryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1380,7 +1380,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse resendCertificateEmailDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1458,7 +1458,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse verifyDomainOwnershipDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificatesInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificatesInner.java index cc68650ba895..3fe8e8a7f7aa 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificatesInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificatesInner.java @@ -161,7 +161,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getCertificatesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -239,7 +239,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -328,7 +328,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -406,7 +406,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -495,7 +495,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -564,7 +564,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> getCsrsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -642,7 +642,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getCsrDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -731,7 +731,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateCsrDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -809,7 +809,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteCsrDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -898,7 +898,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateCsrDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ClassicMobileServicesInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ClassicMobileServicesInner.java index 5248e2e5a81a..4ef0b294f882 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ClassicMobileServicesInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ClassicMobileServicesInner.java @@ -128,7 +128,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getClassicMobileServicesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -206,7 +206,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getClassicMobileServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -284,7 +284,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteClassicMobileServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainsInner.java index af4b71a61a67..c1e32e3119f2 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainsInner.java @@ -144,7 +144,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDomainsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -222,7 +222,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDomainDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -311,7 +311,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateDomainDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -465,7 +465,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteDomainDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -554,7 +554,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateDomainDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -642,7 +642,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDomainOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .register(500, new TypeToken() { }.getType()) diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/GlobalCertificateOrdersInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/GlobalCertificateOrdersInner.java index c5e4ba65a5cb..8dcf479d6a2f 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/GlobalCertificateOrdersInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/GlobalCertificateOrdersInner.java @@ -117,7 +117,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getAllCertificateOrdersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -188,7 +188,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse validateCertificatePurchaseInformationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/GlobalDomainRegistrationsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/GlobalDomainRegistrationsInner.java index 57f37ae78cdc..bf133599471a 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/GlobalDomainRegistrationsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/GlobalDomainRegistrationsInner.java @@ -129,7 +129,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getAllDomainsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -189,7 +189,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDomainControlCenterSsoRequestDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -260,7 +260,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse validateDomainPurchaseInformationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -385,7 +385,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse checkDomainAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -456,7 +456,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listDomainRecommendationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/GlobalResourceGroupsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/GlobalResourceGroupsInner.java index 30bd374ae38c..a45a3a9d9549 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/GlobalResourceGroupsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/GlobalResourceGroupsInner.java @@ -130,7 +130,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse moveResourcesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .build(response); } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/GlobalsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/GlobalsInner.java index 9308915c8840..bd6a63376dac 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/GlobalsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/GlobalsInner.java @@ -162,7 +162,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSubscriptionPublishingCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -233,7 +233,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSubscriptionPublishingCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -350,7 +350,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSubscriptionGeoRegionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -410,7 +410,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getAllCertificatesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -529,7 +529,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getAllServerFarmsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -589,7 +589,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getAllSitesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -649,7 +649,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getAllHostingEnvironmentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -709,7 +709,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getAllManagedHostingEnvironmentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -769,7 +769,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getAllClassicMobileServicesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -829,7 +829,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listPremierAddOnOffersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -898,7 +898,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse isHostingEnvironmentNameAvailableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -967,7 +967,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse isHostingEnvironmentWithLegacyNameAvailableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1038,7 +1038,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse checkNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostingEnvironmentsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostingEnvironmentsInner.java index 5cee075679bb..41ed707d485e 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostingEnvironmentsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostingEnvironmentsInner.java @@ -303,7 +303,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -470,7 +470,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(400, new TypeToken() { }.getType()) @@ -766,7 +766,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(400, new TypeToken() { }.getType()) @@ -848,7 +848,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> getHostingEnvironmentDiagnosticsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -935,7 +935,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentDiagnosticsItemDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1013,7 +1013,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentCapacitiesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1091,7 +1091,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentVipsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1160,7 +1160,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1238,7 +1238,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse rebootHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(400, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) @@ -1319,7 +1319,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentOperationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1406,7 +1406,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) @@ -1566,7 +1566,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1644,7 +1644,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1797,7 +1797,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1966,7 +1966,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentMultiRoleMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2141,7 +2141,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentWebWorkerMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2219,7 +2219,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentMultiRoleMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2306,7 +2306,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentWebWorkerMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2384,7 +2384,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentMultiRoleUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2471,7 +2471,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentWebWorkerUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2624,7 +2624,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentSitesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2702,7 +2702,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentWebHostingPlansDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2780,7 +2780,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getHostingEnvironmentServerFarmsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2858,7 +2858,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getMultiRolePoolsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2936,7 +2936,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getMultiRolePoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3103,7 +3103,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateMultiRolePoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(400, new TypeToken() { }.getType()) @@ -3185,7 +3185,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getMultiRolePoolSkusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3263,7 +3263,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getWorkerPoolsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3350,7 +3350,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getWorkerPoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3534,7 +3534,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateWorkerPoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(400, new TypeToken() { }.getType()) @@ -3625,7 +3625,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getWorkerPoolSkusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3818,7 +3818,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getWorkerPoolInstanceMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3914,7 +3914,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getWorkerPoolInstanceMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4085,7 +4085,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getMultiRolePoolInstanceMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4172,7 +4172,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getMultiRolePoolInstanceMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4318,7 +4318,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginSuspendHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -4465,7 +4465,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginResumeHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedHostingEnvironmentsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedHostingEnvironmentsInner.java index fd0058e7cb67..6e4ec274f10b 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedHostingEnvironmentsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedHostingEnvironmentsInner.java @@ -173,7 +173,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getManagedHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -340,7 +340,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateManagedHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(400, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) @@ -635,7 +635,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginDeleteManagedHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(400, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) @@ -707,7 +707,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getManagedHostingEnvironmentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -785,7 +785,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getManagedHostingEnvironmentVipsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -872,7 +872,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getManagedHostingEnvironmentOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) @@ -1028,7 +1028,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getManagedHostingEnvironmentSitesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1106,7 +1106,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getManagedHostingEnvironmentWebHostingPlansDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1184,7 +1184,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getManagedHostingEnvironmentServerFarmsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ProvidersInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ProvidersInner.java index 51424ec5323f..8fc240f6af34 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ProvidersInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ProvidersInner.java @@ -122,7 +122,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSourceControlsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -184,7 +184,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -257,7 +257,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -310,7 +310,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getPublishingUserDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -374,7 +374,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updatePublishingUserDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/RecommendationsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/RecommendationsInner.java index 073300bfafe9..e1b05b281782 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/RecommendationsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/RecommendationsInner.java @@ -184,7 +184,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> getRecommendationBySubscriptionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -271,7 +271,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getRuleDetailsBySiteNameDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -432,7 +432,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> getRecommendedRulesForSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -589,7 +589,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> getRecommendationHistoryForSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ServerFarmsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ServerFarmsInner.java index a591daed0318..c889f0382081 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ServerFarmsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ServerFarmsInner.java @@ -211,7 +211,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getServerFarmsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -289,7 +289,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getServerFarmDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -623,7 +623,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateServerFarmDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -702,7 +702,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteServerFarmDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -859,7 +859,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getServerFarmMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -937,7 +937,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getServerFarmMetricDefintionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1015,7 +1015,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> getVnetsForServerFarmDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1102,7 +1102,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getVnetFromServerFarmDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1190,7 +1190,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> getRoutesForVnetDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1286,7 +1286,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> getRouteForVnetDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .register(404, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1394,7 +1394,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateVnetRouteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(400, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) @@ -1492,7 +1492,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteVnetRouteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1600,7 +1600,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateVnetRouteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(400, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) @@ -1698,7 +1698,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getServerFarmVnetGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1805,7 +1805,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateServerFarmVnetGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1994,7 +1994,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> getServerFarmSitesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2081,7 +2081,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse rebootWorkerForServerFarmDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2234,7 +2234,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse restartSitesForServerFarmDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2321,7 +2321,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getServerFarmOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2384,7 +2384,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> getServerFarmSitesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SitesInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SitesInner.java index 4b14466e34e2..ec6fa4334355 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SitesInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SitesInner.java @@ -838,7 +838,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteVNETConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -945,7 +945,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateSiteVNETConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1041,7 +1041,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteSiteVNETConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1148,7 +1148,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteVNETConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1235,7 +1235,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteVNETConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1333,7 +1333,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateSiteVNETConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1420,7 +1420,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteSiteVNETConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1518,7 +1518,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteVNETConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1614,7 +1614,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteNetworkFeaturesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1702,7 +1702,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteNetworkFeaturesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1799,7 +1799,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteOperationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1886,7 +1886,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2053,7 +2053,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginSwapSlotWithProductionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -2238,7 +2238,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginSwapSlotsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -2328,7 +2328,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSlotsDifferencesFromProductionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2426,7 +2426,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSlotsDifferencesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2515,7 +2515,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse applySlotConfigToProductionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2613,7 +2613,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse applySlotConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2691,7 +2691,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse resetProductionSlotConfigDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2778,7 +2778,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse resetSlotConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2856,7 +2856,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSlotConfigNamesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2945,7 +2945,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSlotConfigNamesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3098,7 +3098,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteSlotsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3241,7 +3241,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSitesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3394,7 +3394,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3756,7 +3756,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -3922,7 +3922,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4093,7 +4093,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4489,7 +4489,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginCreateOrUpdateSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -4673,7 +4673,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4751,7 +4751,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse isSiteCloneableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4838,7 +4838,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse isSiteCloneableSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -5005,7 +5005,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginRecoverSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -5190,7 +5190,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginRecoverSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -5269,7 +5269,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteSnapshotsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -5356,7 +5356,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteSnapshotsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -5495,7 +5495,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDeletedSitesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -5573,7 +5573,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDeploymentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -5660,7 +5660,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDeploymentsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -5747,7 +5747,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getInstanceDeploymentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -5843,7 +5843,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getInstanceDeploymentsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -5939,7 +5939,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getInstanceDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -6046,7 +6046,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createInstanceDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -6142,7 +6142,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteInstanceDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -6229,7 +6229,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -6327,7 +6327,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -6414,7 +6414,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -6510,7 +6510,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -6617,7 +6617,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -6713,7 +6713,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -6818,7 +6818,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getInstanceDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -6934,7 +6934,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createInstanceDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -7039,7 +7039,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteInstanceDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -7117,7 +7117,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteInstanceIdentifiersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -7204,7 +7204,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteInstanceIdentifiersSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -7282,7 +7282,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteHostNameBindingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -7369,7 +7369,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteHostNameBindingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -7456,7 +7456,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteHostNameBindingDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -7554,7 +7554,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateSiteHostNameBindingDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -7641,7 +7641,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteSiteHostNameBindingDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -7737,7 +7737,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteHostNameBindingSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -7844,7 +7844,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateSiteHostNameBindingSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -7940,7 +7940,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteSiteHostNameBindingSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -8018,7 +8018,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteConfigDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -8107,7 +8107,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateSiteConfigDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -8196,7 +8196,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteConfigDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -8283,7 +8283,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -8381,7 +8381,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateSiteConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -8479,7 +8479,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -8557,7 +8557,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -8646,7 +8646,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateSiteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -8724,7 +8724,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteSiteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -8813,7 +8813,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -8900,7 +8900,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -8998,7 +8998,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateSiteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -9085,7 +9085,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteSiteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -9183,7 +9183,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -9270,7 +9270,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listSiteAppSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -9348,7 +9348,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listSiteAppSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -9437,7 +9437,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteAppSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -9535,7 +9535,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteAppSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -9613,7 +9613,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listSiteConnectionStringsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -9700,7 +9700,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listSiteConnectionStringsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -9789,7 +9789,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteConnectionStringsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -9887,7 +9887,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteConnectionStringsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -9965,7 +9965,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listSiteAuthSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -10052,7 +10052,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listSiteAuthSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -10141,7 +10141,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteAuthSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -10239,7 +10239,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteAuthSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -10385,7 +10385,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginListSitePublishingCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -10548,7 +10548,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginListSitePublishingCredentialsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -10626,7 +10626,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listSiteMetadataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -10713,7 +10713,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listSiteMetadataSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -10802,7 +10802,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteMetadataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -10900,7 +10900,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteMetadataSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -10978,7 +10978,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteLogsConfigDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -11067,7 +11067,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteLogsConfigDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -11154,7 +11154,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteLogsConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -11252,7 +11252,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteLogsConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -11328,7 +11328,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listSitePremierAddOnsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -11413,7 +11413,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listSitePremierAddOnsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -11498,7 +11498,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSitePremierAddOnDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -11594,7 +11594,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse addSitePremierAddOnDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -11679,7 +11679,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteSitePremierAddOnDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -11773,7 +11773,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSitePremierAddOnSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -11878,7 +11878,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse addSitePremierAddOnSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -11972,7 +11972,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteSitePremierAddOnSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -12050,7 +12050,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteBackupConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -12137,7 +12137,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteBackupConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -12226,7 +12226,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteBackupConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -12324,7 +12324,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteBackupConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -12413,7 +12413,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse backupSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -12511,7 +12511,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse backupSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -12600,7 +12600,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse discoverSiteRestoreDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -12698,7 +12698,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse discoverSiteRestoreSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -12776,7 +12776,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listSiteBackupsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -12863,7 +12863,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listSiteBackupsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -12950,7 +12950,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteBackupStatusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -13037,7 +13037,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteBackupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -13133,7 +13133,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteBackupStatusSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -13229,7 +13229,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteBackupSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -13336,7 +13336,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteBackupStatusSecretsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -13434,7 +13434,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteBackupStatusSecretsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -13618,7 +13618,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginRestoreSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -13819,7 +13819,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse beginRestoreSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -13972,7 +13972,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -14143,7 +14143,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteUsagesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -14300,7 +14300,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -14475,7 +14475,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteMetricsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -14562,7 +14562,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteMetricDefinitionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -14640,7 +14640,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -14807,7 +14807,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listSitePublishingProfileXmlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -14992,7 +14992,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listSitePublishingProfileXmlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -15167,7 +15167,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse restartSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -15324,7 +15324,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse restartSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -15402,7 +15402,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse startSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -15489,7 +15489,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse startSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -15567,7 +15567,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse stopSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -15654,7 +15654,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse stopSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -15730,7 +15730,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse syncSiteRepositoryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -15815,7 +15815,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse syncSiteRepositorySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -15902,7 +15902,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse generateNewSitePublishingPasswordSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -15980,7 +15980,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse generateNewSitePublishingPasswordDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -16067,7 +16067,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteRelayServiceConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -16165,7 +16165,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateSiteRelayServiceConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -16252,7 +16252,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteSiteRelayServiceConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -16350,7 +16350,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteRelayServiceConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -16446,7 +16446,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteRelayServiceConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -16553,7 +16553,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateSiteRelayServiceConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -16649,7 +16649,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse deleteSiteRelayServiceConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -16756,7 +16756,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteRelayServiceConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -16843,7 +16843,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listSiteRelayServiceConnectionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -16921,7 +16921,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listSiteRelayServiceConnectionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -17026,7 +17026,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteVnetGatewaySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -17143,7 +17143,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateSiteVNETConnectionGatewaySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -17259,7 +17259,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteVNETConnectionGatewaySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -17355,7 +17355,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getSiteVnetGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -17463,7 +17463,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse createOrUpdateSiteVNETConnectionGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -17570,7 +17570,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse updateSiteVNETConnectionGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -17648,7 +17648,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> getSiteVNETConnectionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); @@ -17735,7 +17735,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse> getSiteVNETConnectionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/TopLevelDomainsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/TopLevelDomainsInner.java index 4eb78d4e814d..38c74d9085df 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/TopLevelDomainsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/TopLevelDomainsInner.java @@ -120,7 +120,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getGetTopLevelDomainsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -189,7 +189,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getTopLevelDomainDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -332,7 +332,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse listTopLevelDomainAgreementsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UsagesInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UsagesInner.java index 42bae237a03c..983b3c3d4f72 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UsagesInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UsagesInner.java @@ -139,7 +139,7 @@ public void onResponse(Call call, Response response) } private ServiceResponse getUsageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.restClient().mapperAdapter()) + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/WebSiteManagementClientImpl.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/WebSiteManagementClientImpl.java index 2f27bcc123ac..8edeba2e572d 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/WebSiteManagementClientImpl.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/WebSiteManagementClientImpl.java @@ -8,9 +8,8 @@ import com.microsoft.azure.AzureClient; import com.microsoft.azure.AzureServiceClient; -import com.microsoft.azure.serializer.AzureJacksonMapperAdapter; +import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; /** * Initializes a new instance of the WebSiteManagementClientImpl class. @@ -43,9 +42,11 @@ public String subscriptionId() { * Sets Subscription Id. * * @param subscriptionId the subscriptionId value. + * @return the service client itself */ - public void withSubscriptionId(String subscriptionId) { + public WebSiteManagementClientImpl withSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; + return this; } /** API Version. */ @@ -76,9 +77,11 @@ public String acceptLanguage() { * Sets Gets or sets the preferred language for the response. * * @param acceptLanguage the acceptLanguage value. + * @return the service client itself */ - public void withAcceptLanguage(String acceptLanguage) { + public WebSiteManagementClientImpl withAcceptLanguage(String acceptLanguage) { this.acceptLanguage = acceptLanguage; + return this; } /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ @@ -97,9 +100,11 @@ public int longRunningOperationRetryTimeout() { * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. * * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself */ - public void withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + public WebSiteManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; } /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ @@ -118,9 +123,11 @@ public boolean generateClientRequestId() { * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself */ - public void withGenerateClientRequestId(boolean generateClientRequestId) { + public WebSiteManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { this.generateClientRequestId = generateClientRequestId; + return this; } /** @@ -347,8 +354,8 @@ public WebSiteManagementClientImpl(ServiceClientCredentials credentials) { * @param credentials the management credentials for Azure */ public WebSiteManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - this(new RestClient.Builder(baseUrl) - .withMapperAdapter(new AzureJacksonMapperAdapter()) + this(new RestClient.Builder() + .withBaseUrl(baseUrl) .withCredentials(credentials) .build()); } diff --git a/azure/src/main/java/com/microsoft/azure/Azure.java b/azure/src/main/java/com/microsoft/azure/Azure.java index 103f010d944f..22c620cf2bc6 100644 --- a/azure/src/main/java/com/microsoft/azure/Azure.java +++ b/azure/src/main/java/com/microsoft/azure/Azure.java @@ -31,7 +31,6 @@ import com.microsoft.azure.management.storage.StorageAccounts; import com.microsoft.azure.management.storage.Usages; import com.microsoft.azure.management.storage.implementation.StorageManager; -import com.microsoft.rest.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; import java.io.File; From 8d34537a0b3486a1c27c55d10be49715847822ab Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 16 Jun 2016 16:15:04 -0700 Subject: [PATCH 3/4] Allow case-insensitive enums --- .../azure/batch/protocol/models/AllocationState.java | 2 +- .../azure/batch/protocol/models/CertificateFormat.java | 2 +- .../azure/batch/protocol/models/CertificateState.java | 2 +- .../batch/protocol/models/CertificateStoreLocation.java | 2 +- .../azure/batch/protocol/models/CertificateVisibility.java | 2 +- .../protocol/models/ComputeNodeDeallocationOption.java | 2 +- .../azure/batch/protocol/models/ComputeNodeFillType.java | 2 +- .../batch/protocol/models/ComputeNodeRebootOption.java | 2 +- .../batch/protocol/models/ComputeNodeReimageOption.java | 2 +- .../azure/batch/protocol/models/ComputeNodeState.java | 2 +- .../protocol/models/DisableComputeNodeSchedulingOption.java | 2 +- .../azure/batch/protocol/models/DisableJobOption.java | 2 +- .../batch/protocol/models/JobPreparationTaskState.java | 2 +- .../azure/batch/protocol/models/JobReleaseTaskState.java | 2 +- .../azure/batch/protocol/models/JobScheduleState.java | 2 +- .../com/microsoft/azure/batch/protocol/models/JobState.java | 2 +- .../com/microsoft/azure/batch/protocol/models/OSType.java | 2 +- .../azure/batch/protocol/models/PoolLifetimeOption.java | 2 +- .../microsoft/azure/batch/protocol/models/PoolState.java | 2 +- .../batch/protocol/models/SchedulingErrorCategory.java | 2 +- .../azure/batch/protocol/models/SchedulingState.java | 2 +- .../azure/batch/protocol/models/StartTaskState.java | 2 +- .../azure/batch/protocol/models/TaskAddStatus.java | 2 +- .../microsoft/azure/batch/protocol/models/TaskState.java | 2 +- .../management/compute/implementation/api/CachingTypes.java | 2 +- .../compute/implementation/api/ComponentNames.java | 2 +- .../compute/implementation/api/DiskCreateOptionTypes.java | 2 +- .../compute/implementation/api/ForceUpdateTagTypes.java | 2 +- .../compute/implementation/api/InstanceViewTypes.java | 2 +- .../compute/implementation/api/OperatingSystemTypes.java | 2 +- .../management/compute/implementation/api/PassNames.java | 2 +- .../compute/implementation/api/ProtocolTypes.java | 2 +- .../management/compute/implementation/api/SettingNames.java | 2 +- .../compute/implementation/api/StatusLevelTypes.java | 2 +- .../management/compute/implementation/api/UpgradeMode.java | 2 +- .../api/VirtualMachineScaleSetSkuScaleType.java | 2 +- .../management/datalake/analytics/models/CompileMode.java | 2 +- .../analytics/models/DataLakeAnalyticsAccountState.java | 2 +- .../analytics/models/DataLakeAnalyticsAccountStatus.java | 2 +- .../management/datalake/analytics/models/FileType.java | 2 +- .../datalake/analytics/models/JobResourceType.java | 2 +- .../management/datalake/analytics/models/JobResult.java | 2 +- .../management/datalake/analytics/models/JobState.java | 2 +- .../azure/management/datalake/analytics/models/JobType.java | 2 +- .../datalake/analytics/models/OperationStatus.java | 2 +- .../management/datalake/analytics/models/SeverityTypes.java | 2 +- .../management/datalake/store/models/AppendModeType.java | 2 +- .../datalake/store/models/DataLakeStoreAccountState.java | 2 +- .../datalake/store/models/DataLakeStoreAccountStatus.java | 2 +- .../azure/management/datalake/store/models/FileType.java | 2 +- .../management/datalake/store/models/OperationStatus.java | 2 +- .../implementation/api/NetworkInterfaceIPConfiguration.java | 6 +++--- .../resources/implementation/api/DeploymentMode.java | 2 +- .../management/storage/implementation/api/AccessTier.java | 2 +- .../storage/implementation/api/AccountStatus.java | 2 +- .../storage/implementation/api/KeyPermission.java | 2 +- .../azure/management/storage/implementation/api/Kind.java | 2 +- .../storage/implementation/api/ProvisioningState.java | 2 +- .../azure/management/storage/implementation/api/Reason.java | 2 +- .../management/storage/implementation/api/SkuName.java | 2 +- .../management/storage/implementation/api/SkuTier.java | 2 +- .../management/storage/implementation/api/UsageUnit.java | 2 +- .../implementation/api/AccessControlEntryAction.java | 2 +- .../website/implementation/api/AutoHealActionType.java | 2 +- .../website/implementation/api/AzureResourceType.java | 2 +- .../website/implementation/api/BackupItemStatus.java | 2 +- .../implementation/api/BackupRestoreOperationType.java | 2 +- .../implementation/api/BuiltInAuthenticationProvider.java | 2 +- .../implementation/api/CertificateOrderActionType.java | 2 +- .../website/implementation/api/CertificateOrderStatus.java | 2 +- .../website/implementation/api/CertificateProductType.java | 2 +- .../management/website/implementation/api/Channels.java | 2 +- .../website/implementation/api/CloneAbilityResult.java | 2 +- .../website/implementation/api/ComputeModeOptions.java | 2 +- .../implementation/api/CustomHostNameDnsRecordType.java | 2 +- .../website/implementation/api/DatabaseServerType.java | 2 +- .../management/website/implementation/api/DomainStatus.java | 2 +- .../management/website/implementation/api/DomainType.java | 2 +- .../website/implementation/api/FrequencyUnit.java | 2 +- .../management/website/implementation/api/HostNameType.java | 2 +- .../implementation/api/HostingEnvironmentStatus.java | 2 +- .../implementation/api/InternalLoadBalancingMode.java | 2 +- .../website/implementation/api/KeyVaultSecretStatus.java | 2 +- .../management/website/implementation/api/LogLevel.java | 2 +- .../implementation/api/ManagedHostingEnvironmentStatus.java | 2 +- .../website/implementation/api/ManagedPipelineMode.java | 2 +- .../website/implementation/api/NotificationLevel.java | 2 +- .../website/implementation/api/ProvisioningState.java | 2 +- .../website/implementation/api/SiteAvailabilityState.java | 2 +- .../website/implementation/api/SiteLoadBalancing.java | 2 +- .../management/website/implementation/api/SslState.java | 2 +- .../website/implementation/api/StatusOptions.java | 2 +- .../implementation/api/UnauthenticatedClientAction.java | 2 +- .../management/website/implementation/api/UsageState.java | 2 +- .../website/implementation/api/WorkerSizeOptions.java | 2 +- 95 files changed, 97 insertions(+), 97 deletions(-) diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/AllocationState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/AllocationState.java index 45af113ac07f..d7ddc2f55dec 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/AllocationState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/AllocationState.java @@ -49,7 +49,7 @@ public String toValue() { public static AllocationState fromValue(String value) { AllocationState[] items = AllocationState.values(); for (AllocationState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateFormat.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateFormat.java index c6beb940ffe9..3e458fea03a7 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateFormat.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateFormat.java @@ -49,7 +49,7 @@ public String toValue() { public static CertificateFormat fromValue(String value) { CertificateFormat[] items = CertificateFormat.values(); for (CertificateFormat item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateState.java index 6671f2c697c4..d9037e5961f4 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateState.java @@ -49,7 +49,7 @@ public String toValue() { public static CertificateState fromValue(String value) { CertificateState[] items = CertificateState.values(); for (CertificateState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateStoreLocation.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateStoreLocation.java index 6cc512f6aa55..ed3971ed4cd4 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateStoreLocation.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateStoreLocation.java @@ -49,7 +49,7 @@ public String toValue() { public static CertificateStoreLocation fromValue(String value) { CertificateStoreLocation[] items = CertificateStoreLocation.values(); for (CertificateStoreLocation item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateVisibility.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateVisibility.java index 6b12003591c6..e1b889273789 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateVisibility.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateVisibility.java @@ -52,7 +52,7 @@ public String toValue() { public static CertificateVisibility fromValue(String value) { CertificateVisibility[] items = CertificateVisibility.values(); for (CertificateVisibility item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeDeallocationOption.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeDeallocationOption.java index e6c97132651b..69e6c74c4623 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeDeallocationOption.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeDeallocationOption.java @@ -52,7 +52,7 @@ public String toValue() { public static ComputeNodeDeallocationOption fromValue(String value) { ComputeNodeDeallocationOption[] items = ComputeNodeDeallocationOption.values(); for (ComputeNodeDeallocationOption item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeFillType.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeFillType.java index 623fcb8e5dca..5b9a3b20d35e 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeFillType.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeFillType.java @@ -49,7 +49,7 @@ public String toValue() { public static ComputeNodeFillType fromValue(String value) { ComputeNodeFillType[] items = ComputeNodeFillType.values(); for (ComputeNodeFillType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeRebootOption.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeRebootOption.java index 0fa71316fb6a..86c88614c121 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeRebootOption.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeRebootOption.java @@ -52,7 +52,7 @@ public String toValue() { public static ComputeNodeRebootOption fromValue(String value) { ComputeNodeRebootOption[] items = ComputeNodeRebootOption.values(); for (ComputeNodeRebootOption item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeReimageOption.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeReimageOption.java index 348b6e4683f9..4a47160a3f73 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeReimageOption.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeReimageOption.java @@ -52,7 +52,7 @@ public String toValue() { public static ComputeNodeReimageOption fromValue(String value) { ComputeNodeReimageOption[] items = ComputeNodeReimageOption.values(); for (ComputeNodeReimageOption item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeState.java index 879831da16a4..48cb23f2b3be 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeState.java @@ -76,7 +76,7 @@ public String toValue() { public static ComputeNodeState fromValue(String value) { ComputeNodeState[] items = ComputeNodeState.values(); for (ComputeNodeState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/DisableComputeNodeSchedulingOption.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/DisableComputeNodeSchedulingOption.java index df008d3962bd..1623a4c39ce6 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/DisableComputeNodeSchedulingOption.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/DisableComputeNodeSchedulingOption.java @@ -49,7 +49,7 @@ public String toValue() { public static DisableComputeNodeSchedulingOption fromValue(String value) { DisableComputeNodeSchedulingOption[] items = DisableComputeNodeSchedulingOption.values(); for (DisableComputeNodeSchedulingOption item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/DisableJobOption.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/DisableJobOption.java index 9b769e2bedd3..f36389479e8f 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/DisableJobOption.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/DisableJobOption.java @@ -49,7 +49,7 @@ public String toValue() { public static DisableJobOption fromValue(String value) { DisableJobOption[] items = DisableJobOption.values(); for (DisableJobOption item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobPreparationTaskState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobPreparationTaskState.java index 4f6befea1fa9..0aa0ba003a38 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobPreparationTaskState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobPreparationTaskState.java @@ -46,7 +46,7 @@ public String toValue() { public static JobPreparationTaskState fromValue(String value) { JobPreparationTaskState[] items = JobPreparationTaskState.values(); for (JobPreparationTaskState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobReleaseTaskState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobReleaseTaskState.java index 79feff98c81e..1e14c439850b 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobReleaseTaskState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobReleaseTaskState.java @@ -46,7 +46,7 @@ public String toValue() { public static JobReleaseTaskState fromValue(String value) { JobReleaseTaskState[] items = JobReleaseTaskState.values(); for (JobReleaseTaskState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobScheduleState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobScheduleState.java index 89ab26203134..343ff572c966 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobScheduleState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobScheduleState.java @@ -55,7 +55,7 @@ public String toValue() { public static JobScheduleState fromValue(String value) { JobScheduleState[] items = JobScheduleState.values(); for (JobScheduleState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobState.java index 2e8447a598cf..28dbed15c49c 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobState.java @@ -61,7 +61,7 @@ public String toValue() { public static JobState fromValue(String value) { JobState[] items = JobState.values(); for (JobState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/OSType.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/OSType.java index 54376d99302d..76be61ed47f5 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/OSType.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/OSType.java @@ -49,7 +49,7 @@ public String toValue() { public static OSType fromValue(String value) { OSType[] items = OSType.values(); for (OSType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolLifetimeOption.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolLifetimeOption.java index 359d3e6abac2..792b88d4693c 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolLifetimeOption.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolLifetimeOption.java @@ -49,7 +49,7 @@ public String toValue() { public static PoolLifetimeOption fromValue(String value) { PoolLifetimeOption[] items = PoolLifetimeOption.values(); for (PoolLifetimeOption item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolState.java index f39fbfa93116..d9c588c22e4e 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolState.java @@ -49,7 +49,7 @@ public String toValue() { public static PoolState fromValue(String value) { PoolState[] items = PoolState.values(); for (PoolState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/SchedulingErrorCategory.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/SchedulingErrorCategory.java index 79b7d4182152..74da1a35f4d3 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/SchedulingErrorCategory.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/SchedulingErrorCategory.java @@ -49,7 +49,7 @@ public String toValue() { public static SchedulingErrorCategory fromValue(String value) { SchedulingErrorCategory[] items = SchedulingErrorCategory.values(); for (SchedulingErrorCategory item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/SchedulingState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/SchedulingState.java index e2949c3eba12..ff3c48586585 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/SchedulingState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/SchedulingState.java @@ -46,7 +46,7 @@ public String toValue() { public static SchedulingState fromValue(String value) { SchedulingState[] items = SchedulingState.values(); for (SchedulingState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/StartTaskState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/StartTaskState.java index f993344454ba..ae2152c8dbf4 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/StartTaskState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/StartTaskState.java @@ -46,7 +46,7 @@ public String toValue() { public static StartTaskState fromValue(String value) { StartTaskState[] items = StartTaskState.values(); for (StartTaskState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/TaskAddStatus.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/TaskAddStatus.java index 9cf6dede9ebe..2517a45c06a1 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/TaskAddStatus.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/TaskAddStatus.java @@ -52,7 +52,7 @@ public String toValue() { public static TaskAddStatus fromValue(String value) { TaskAddStatus[] items = TaskAddStatus.values(); for (TaskAddStatus item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/TaskState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/TaskState.java index 699853115ea1..2730ba6d137a 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/TaskState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/TaskState.java @@ -52,7 +52,7 @@ public String toValue() { public static TaskState fromValue(String value) { TaskState[] items = TaskState.values(); for (TaskState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/CachingTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/CachingTypes.java index 6c9dc4f9f5f3..b89bbb66efaf 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/CachingTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/CachingTypes.java @@ -49,7 +49,7 @@ public String toValue() { public static CachingTypes fromValue(String value) { CachingTypes[] items = CachingTypes.values(); for (CachingTypes item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ComponentNames.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ComponentNames.java index cb83bca3a4a1..ac1cc1a31485 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ComponentNames.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ComponentNames.java @@ -43,7 +43,7 @@ public String toValue() { public static ComponentNames fromValue(String value) { ComponentNames[] items = ComponentNames.values(); for (ComponentNames item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/DiskCreateOptionTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/DiskCreateOptionTypes.java index ae340f60fd29..abe36786eda6 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/DiskCreateOptionTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/DiskCreateOptionTypes.java @@ -49,7 +49,7 @@ public String toValue() { public static DiskCreateOptionTypes fromValue(String value) { DiskCreateOptionTypes[] items = DiskCreateOptionTypes.values(); for (DiskCreateOptionTypes item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ForceUpdateTagTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ForceUpdateTagTypes.java index 617d3ad11903..c228e7be7ae7 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ForceUpdateTagTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ForceUpdateTagTypes.java @@ -43,7 +43,7 @@ public String toValue() { public static ForceUpdateTagTypes fromValue(String value) { ForceUpdateTagTypes[] items = ForceUpdateTagTypes.values(); for (ForceUpdateTagTypes item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/InstanceViewTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/InstanceViewTypes.java index 3fba7caae709..8c842230491b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/InstanceViewTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/InstanceViewTypes.java @@ -43,7 +43,7 @@ public String toValue() { public static InstanceViewTypes fromValue(String value) { InstanceViewTypes[] items = InstanceViewTypes.values(); for (InstanceViewTypes item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/OperatingSystemTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/OperatingSystemTypes.java index 29b2e57fb842..bf1e169b39be 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/OperatingSystemTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/OperatingSystemTypes.java @@ -46,7 +46,7 @@ public String toValue() { public static OperatingSystemTypes fromValue(String value) { OperatingSystemTypes[] items = OperatingSystemTypes.values(); for (OperatingSystemTypes item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/PassNames.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/PassNames.java index febbaadabf3a..72514facb830 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/PassNames.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/PassNames.java @@ -43,7 +43,7 @@ public String toValue() { public static PassNames fromValue(String value) { PassNames[] items = PassNames.values(); for (PassNames item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ProtocolTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ProtocolTypes.java index a68aa71d19cd..eba877e99d75 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ProtocolTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ProtocolTypes.java @@ -46,7 +46,7 @@ public String toValue() { public static ProtocolTypes fromValue(String value) { ProtocolTypes[] items = ProtocolTypes.values(); for (ProtocolTypes item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/SettingNames.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/SettingNames.java index 89968ccf0723..455cd47abf19 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/SettingNames.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/SettingNames.java @@ -46,7 +46,7 @@ public String toValue() { public static SettingNames fromValue(String value) { SettingNames[] items = SettingNames.values(); for (SettingNames item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/StatusLevelTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/StatusLevelTypes.java index 399017d9ebcd..04ad6b4956b7 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/StatusLevelTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/StatusLevelTypes.java @@ -49,7 +49,7 @@ public String toValue() { public static StatusLevelTypes fromValue(String value) { StatusLevelTypes[] items = StatusLevelTypes.values(); for (StatusLevelTypes item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/UpgradeMode.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/UpgradeMode.java index 7f865625b804..8c9b929376e4 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/UpgradeMode.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/UpgradeMode.java @@ -46,7 +46,7 @@ public String toValue() { public static UpgradeMode fromValue(String value) { UpgradeMode[] items = UpgradeMode.values(); for (UpgradeMode item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineScaleSetSkuScaleType.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineScaleSetSkuScaleType.java index 96b0f8276ce2..ff32ff9e3d05 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineScaleSetSkuScaleType.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineScaleSetSkuScaleType.java @@ -46,7 +46,7 @@ public String toValue() { public static VirtualMachineScaleSetSkuScaleType fromValue(String value) { VirtualMachineScaleSetSkuScaleType[] items = VirtualMachineScaleSetSkuScaleType.values(); for (VirtualMachineScaleSetSkuScaleType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/CompileMode.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/CompileMode.java index 27eb26f72c47..2e80f7dc1f10 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/CompileMode.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/CompileMode.java @@ -49,7 +49,7 @@ public String toValue() { public static CompileMode fromValue(String value) { CompileMode[] items = CompileMode.values(); for (CompileMode item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/DataLakeAnalyticsAccountState.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/DataLakeAnalyticsAccountState.java index 82b4319b8ae3..5249e8b38a47 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/DataLakeAnalyticsAccountState.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/DataLakeAnalyticsAccountState.java @@ -46,7 +46,7 @@ public String toValue() { public static DataLakeAnalyticsAccountState fromValue(String value) { DataLakeAnalyticsAccountState[] items = DataLakeAnalyticsAccountState.values(); for (DataLakeAnalyticsAccountState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/DataLakeAnalyticsAccountStatus.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/DataLakeAnalyticsAccountStatus.java index fa9e085100b1..1d945345aad7 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/DataLakeAnalyticsAccountStatus.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/DataLakeAnalyticsAccountStatus.java @@ -67,7 +67,7 @@ public String toValue() { public static DataLakeAnalyticsAccountStatus fromValue(String value) { DataLakeAnalyticsAccountStatus[] items = DataLakeAnalyticsAccountStatus.values(); for (DataLakeAnalyticsAccountStatus item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/FileType.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/FileType.java index c0c86d2d42b7..81712e3ffb4d 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/FileType.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/FileType.java @@ -46,7 +46,7 @@ public String toValue() { public static FileType fromValue(String value) { FileType[] items = FileType.values(); for (FileType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobResourceType.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobResourceType.java index ccd25c08752e..9a1aa6d1921f 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobResourceType.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobResourceType.java @@ -58,7 +58,7 @@ public String toValue() { public static JobResourceType fromValue(String value) { JobResourceType[] items = JobResourceType.values(); for (JobResourceType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobResult.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobResult.java index cdd8b58cfaa9..642a5ccec36a 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobResult.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobResult.java @@ -52,7 +52,7 @@ public String toValue() { public static JobResult fromValue(String value) { JobResult[] items = JobResult.values(); for (JobResult item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobState.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobState.java index 02b3c3d137d7..96ba37f81a3b 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobState.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobState.java @@ -70,7 +70,7 @@ public String toValue() { public static JobState fromValue(String value) { JobState[] items = JobState.values(); for (JobState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobType.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobType.java index 4d3ea31fb2d7..b7be4e3b79ba 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobType.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobType.java @@ -46,7 +46,7 @@ public String toValue() { public static JobType fromValue(String value) { JobType[] items = JobType.values(); for (JobType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/OperationStatus.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/OperationStatus.java index ccb218ca9dd4..7a1c51b1e78b 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/OperationStatus.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/OperationStatus.java @@ -49,7 +49,7 @@ public String toValue() { public static OperationStatus fromValue(String value) { OperationStatus[] items = OperationStatus.values(); for (OperationStatus item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/SeverityTypes.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/SeverityTypes.java index 5a8b790c46fd..45571b8ad609 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/SeverityTypes.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/SeverityTypes.java @@ -49,7 +49,7 @@ public String toValue() { public static SeverityTypes fromValue(String value) { SeverityTypes[] items = SeverityTypes.values(); for (SeverityTypes item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/AppendModeType.java b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/AppendModeType.java index 86daedecbc7a..07472e155147 100644 --- a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/AppendModeType.java +++ b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/AppendModeType.java @@ -43,7 +43,7 @@ public String toValue() { public static AppendModeType fromValue(String value) { AppendModeType[] items = AppendModeType.values(); for (AppendModeType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/DataLakeStoreAccountState.java b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/DataLakeStoreAccountState.java index 20ece08edb6b..dd1b32020f85 100644 --- a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/DataLakeStoreAccountState.java +++ b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/DataLakeStoreAccountState.java @@ -46,7 +46,7 @@ public String toValue() { public static DataLakeStoreAccountState fromValue(String value) { DataLakeStoreAccountState[] items = DataLakeStoreAccountState.values(); for (DataLakeStoreAccountState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/DataLakeStoreAccountStatus.java b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/DataLakeStoreAccountStatus.java index b66c18886735..47a58a4cae18 100644 --- a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/DataLakeStoreAccountStatus.java +++ b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/DataLakeStoreAccountStatus.java @@ -67,7 +67,7 @@ public String toValue() { public static DataLakeStoreAccountStatus fromValue(String value) { DataLakeStoreAccountStatus[] items = DataLakeStoreAccountStatus.values(); for (DataLakeStoreAccountStatus item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/FileType.java b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/FileType.java index 62268df2ed3f..ecf10c5725a0 100644 --- a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/FileType.java +++ b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/FileType.java @@ -46,7 +46,7 @@ public String toValue() { public static FileType fromValue(String value) { FileType[] items = FileType.values(); for (FileType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/OperationStatus.java b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/OperationStatus.java index 5d146379ed57..088dd78de2a3 100644 --- a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/OperationStatus.java +++ b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/OperationStatus.java @@ -49,7 +49,7 @@ public String toValue() { public static OperationStatus fromValue(String value) { OperationStatus[] items = OperationStatus.values(); for (OperationStatus item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkInterfaceIPConfiguration.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkInterfaceIPConfiguration.java index 44973af4466d..c86f3383d743 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkInterfaceIPConfiguration.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkInterfaceIPConfiguration.java @@ -51,7 +51,7 @@ public class NetworkInterfaceIPConfiguration extends SubResource { * The publicIPAddress property. */ @JsonProperty(value = "properties.publicIPAddress") - private SubResource publicIPAddress; + private PublicIPAddressInner publicIPAddress; /** * The provisioningState property. @@ -175,7 +175,7 @@ public NetworkInterfaceIPConfiguration withSubnet(SubnetInner subnet) { * * @return the publicIPAddress value */ - public SubResource publicIPAddress() { + public PublicIPAddressInner publicIPAddress() { return this.publicIPAddress; } @@ -185,7 +185,7 @@ public SubResource publicIPAddress() { * @param publicIPAddress the publicIPAddress value to set * @return the NetworkInterfaceIPConfiguration object itself. */ - public NetworkInterfaceIPConfiguration withPublicIPAddress(SubResource publicIPAddress) { + public NetworkInterfaceIPConfiguration withPublicIPAddress(PublicIPAddressInner publicIPAddress) { this.publicIPAddress = publicIPAddress; return this; } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/DeploymentMode.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/DeploymentMode.java index 9907ac4f9701..0e18399337c2 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/DeploymentMode.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/DeploymentMode.java @@ -46,7 +46,7 @@ public String toValue() { public static DeploymentMode fromValue(String value) { DeploymentMode[] items = DeploymentMode.values(); for (DeploymentMode item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/AccessTier.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/AccessTier.java index d04a714e1f67..637579e53437 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/AccessTier.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/AccessTier.java @@ -46,7 +46,7 @@ public String toValue() { public static AccessTier fromValue(String value) { AccessTier[] items = AccessTier.values(); for (AccessTier item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/AccountStatus.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/AccountStatus.java index 84ed11134bcc..41fede6adae3 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/AccountStatus.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/AccountStatus.java @@ -46,7 +46,7 @@ public String toValue() { public static AccountStatus fromValue(String value) { AccountStatus[] items = AccountStatus.values(); for (AccountStatus item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/KeyPermission.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/KeyPermission.java index 9ef568c5fc07..67b74bca8719 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/KeyPermission.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/KeyPermission.java @@ -46,7 +46,7 @@ public String toValue() { public static KeyPermission fromValue(String value) { KeyPermission[] items = KeyPermission.values(); for (KeyPermission item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/Kind.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/Kind.java index c9ab1669acfc..fdaa147e9f12 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/Kind.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/Kind.java @@ -46,7 +46,7 @@ public String toValue() { public static Kind fromValue(String value) { Kind[] items = Kind.values(); for (Kind item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/ProvisioningState.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/ProvisioningState.java index 5f11d9827dea..a7638925b9e7 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/ProvisioningState.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/ProvisioningState.java @@ -49,7 +49,7 @@ public String toValue() { public static ProvisioningState fromValue(String value) { ProvisioningState[] items = ProvisioningState.values(); for (ProvisioningState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/Reason.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/Reason.java index 0d2e62381aa9..9e69b1d96522 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/Reason.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/Reason.java @@ -46,7 +46,7 @@ public String toValue() { public static Reason fromValue(String value) { Reason[] items = Reason.values(); for (Reason item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/SkuName.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/SkuName.java index d5f23994fee5..59a9858ba57d 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/SkuName.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/SkuName.java @@ -55,7 +55,7 @@ public String toValue() { public static SkuName fromValue(String value) { SkuName[] items = SkuName.values(); for (SkuName item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/SkuTier.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/SkuTier.java index adbc7cd0c9fa..79a9e12853b2 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/SkuTier.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/SkuTier.java @@ -46,7 +46,7 @@ public String toValue() { public static SkuTier fromValue(String value) { SkuTier[] items = SkuTier.values(); for (SkuTier item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/UsageUnit.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/UsageUnit.java index ca01be1ecf86..05d916b20c72 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/UsageUnit.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/UsageUnit.java @@ -58,7 +58,7 @@ public String toValue() { public static UsageUnit fromValue(String value) { UsageUnit[] items = UsageUnit.values(); for (UsageUnit item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AccessControlEntryAction.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AccessControlEntryAction.java index 88cebee008e4..eeb5153e135c 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AccessControlEntryAction.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AccessControlEntryAction.java @@ -46,7 +46,7 @@ public String toValue() { public static AccessControlEntryAction fromValue(String value) { AccessControlEntryAction[] items = AccessControlEntryAction.values(); for (AccessControlEntryAction item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AutoHealActionType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AutoHealActionType.java index e4a4f9921d94..c60a3ce52d4e 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AutoHealActionType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AutoHealActionType.java @@ -49,7 +49,7 @@ public String toValue() { public static AutoHealActionType fromValue(String value) { AutoHealActionType[] items = AutoHealActionType.values(); for (AutoHealActionType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AzureResourceType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AzureResourceType.java index 802cf7413dd0..81022d3287e8 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AzureResourceType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AzureResourceType.java @@ -46,7 +46,7 @@ public String toValue() { public static AzureResourceType fromValue(String value) { AzureResourceType[] items = AzureResourceType.values(); for (AzureResourceType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BackupItemStatus.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BackupItemStatus.java index fa9f02bc7780..b4016623ee26 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BackupItemStatus.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BackupItemStatus.java @@ -70,7 +70,7 @@ public String toValue() { public static BackupItemStatus fromValue(String value) { BackupItemStatus[] items = BackupItemStatus.values(); for (BackupItemStatus item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BackupRestoreOperationType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BackupRestoreOperationType.java index 769609e4b1b7..02725b9ff3f5 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BackupRestoreOperationType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BackupRestoreOperationType.java @@ -49,7 +49,7 @@ public String toValue() { public static BackupRestoreOperationType fromValue(String value) { BackupRestoreOperationType[] items = BackupRestoreOperationType.values(); for (BackupRestoreOperationType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BuiltInAuthenticationProvider.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BuiltInAuthenticationProvider.java index 699a8ba92ef9..3aeb79b6c74e 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BuiltInAuthenticationProvider.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BuiltInAuthenticationProvider.java @@ -55,7 +55,7 @@ public String toValue() { public static BuiltInAuthenticationProvider fromValue(String value) { BuiltInAuthenticationProvider[] items = BuiltInAuthenticationProvider.values(); for (BuiltInAuthenticationProvider item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrderActionType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrderActionType.java index 8b828948f8ec..681f3aa7ecb6 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrderActionType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrderActionType.java @@ -67,7 +67,7 @@ public String toValue() { public static CertificateOrderActionType fromValue(String value) { CertificateOrderActionType[] items = CertificateOrderActionType.values(); for (CertificateOrderActionType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrderStatus.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrderStatus.java index 5edc6fefd0b5..0c7d5f128691 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrderStatus.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrderStatus.java @@ -70,7 +70,7 @@ public String toValue() { public static CertificateOrderStatus fromValue(String value) { CertificateOrderStatus[] items = CertificateOrderStatus.values(); for (CertificateOrderStatus item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateProductType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateProductType.java index cdacc71c5362..d9f51564a165 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateProductType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateProductType.java @@ -46,7 +46,7 @@ public String toValue() { public static CertificateProductType fromValue(String value) { CertificateProductType[] items = CertificateProductType.values(); for (CertificateProductType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/Channels.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/Channels.java index 73ec08dda71b..cbb9ea337656 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/Channels.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/Channels.java @@ -52,7 +52,7 @@ public String toValue() { public static Channels fromValue(String value) { Channels[] items = Channels.values(); for (Channels item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CloneAbilityResult.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CloneAbilityResult.java index 743a11b0513b..ff70e08ba317 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CloneAbilityResult.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CloneAbilityResult.java @@ -49,7 +49,7 @@ public String toValue() { public static CloneAbilityResult fromValue(String value) { CloneAbilityResult[] items = CloneAbilityResult.values(); for (CloneAbilityResult item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ComputeModeOptions.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ComputeModeOptions.java index 73bb31de1e0b..efa6da71e98f 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ComputeModeOptions.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ComputeModeOptions.java @@ -49,7 +49,7 @@ public String toValue() { public static ComputeModeOptions fromValue(String value) { ComputeModeOptions[] items = ComputeModeOptions.values(); for (ComputeModeOptions item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CustomHostNameDnsRecordType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CustomHostNameDnsRecordType.java index 207111e5cb68..091bd428b910 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CustomHostNameDnsRecordType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CustomHostNameDnsRecordType.java @@ -46,7 +46,7 @@ public String toValue() { public static CustomHostNameDnsRecordType fromValue(String value) { CustomHostNameDnsRecordType[] items = CustomHostNameDnsRecordType.values(); for (CustomHostNameDnsRecordType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DatabaseServerType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DatabaseServerType.java index abf7ffc9574b..34ba47eff674 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DatabaseServerType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DatabaseServerType.java @@ -52,7 +52,7 @@ public String toValue() { public static DatabaseServerType fromValue(String value) { DatabaseServerType[] items = DatabaseServerType.values(); for (DatabaseServerType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainStatus.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainStatus.java index 0d076d39452c..0a6ba4f46a03 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainStatus.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainStatus.java @@ -103,7 +103,7 @@ public String toValue() { public static DomainStatus fromValue(String value) { DomainStatus[] items = DomainStatus.values(); for (DomainStatus item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainType.java index 01ff6ed25f23..cd2c2e8324c5 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainType.java @@ -46,7 +46,7 @@ public String toValue() { public static DomainType fromValue(String value) { DomainType[] items = DomainType.values(); for (DomainType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/FrequencyUnit.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/FrequencyUnit.java index 82c2fcdf9111..abf2b4db5caa 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/FrequencyUnit.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/FrequencyUnit.java @@ -46,7 +46,7 @@ public String toValue() { public static FrequencyUnit fromValue(String value) { FrequencyUnit[] items = FrequencyUnit.values(); for (FrequencyUnit item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostNameType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostNameType.java index 2ba6e9593aa9..b1b907d007b0 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostNameType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostNameType.java @@ -46,7 +46,7 @@ public String toValue() { public static HostNameType fromValue(String value) { HostNameType[] items = HostNameType.values(); for (HostNameType item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostingEnvironmentStatus.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostingEnvironmentStatus.java index 19c328512e0b..d48706ceb39a 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostingEnvironmentStatus.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostingEnvironmentStatus.java @@ -52,7 +52,7 @@ public String toValue() { public static HostingEnvironmentStatus fromValue(String value) { HostingEnvironmentStatus[] items = HostingEnvironmentStatus.values(); for (HostingEnvironmentStatus item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/InternalLoadBalancingMode.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/InternalLoadBalancingMode.java index 1a93f5a947d7..1fc3e9d9a110 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/InternalLoadBalancingMode.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/InternalLoadBalancingMode.java @@ -49,7 +49,7 @@ public String toValue() { public static InternalLoadBalancingMode fromValue(String value) { InternalLoadBalancingMode[] items = InternalLoadBalancingMode.values(); for (InternalLoadBalancingMode item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/KeyVaultSecretStatus.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/KeyVaultSecretStatus.java index d3741a624f8a..2a4df49ca0d5 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/KeyVaultSecretStatus.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/KeyVaultSecretStatus.java @@ -70,7 +70,7 @@ public String toValue() { public static KeyVaultSecretStatus fromValue(String value) { KeyVaultSecretStatus[] items = KeyVaultSecretStatus.values(); for (KeyVaultSecretStatus item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/LogLevel.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/LogLevel.java index 6dfcf4f6dfd1..74b8c4c9ce46 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/LogLevel.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/LogLevel.java @@ -55,7 +55,7 @@ public String toValue() { public static LogLevel fromValue(String value) { LogLevel[] items = LogLevel.values(); for (LogLevel item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedHostingEnvironmentStatus.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedHostingEnvironmentStatus.java index 34c6dc5a977d..8e9276fb24e9 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedHostingEnvironmentStatus.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedHostingEnvironmentStatus.java @@ -49,7 +49,7 @@ public String toValue() { public static ManagedHostingEnvironmentStatus fromValue(String value) { ManagedHostingEnvironmentStatus[] items = ManagedHostingEnvironmentStatus.values(); for (ManagedHostingEnvironmentStatus item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedPipelineMode.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedPipelineMode.java index 67e63624dffd..0d2176a6c27c 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedPipelineMode.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedPipelineMode.java @@ -46,7 +46,7 @@ public String toValue() { public static ManagedPipelineMode fromValue(String value) { ManagedPipelineMode[] items = ManagedPipelineMode.values(); for (ManagedPipelineMode item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/NotificationLevel.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/NotificationLevel.java index 23f859ce4c57..7170b5fda983 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/NotificationLevel.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/NotificationLevel.java @@ -52,7 +52,7 @@ public String toValue() { public static NotificationLevel fromValue(String value) { NotificationLevel[] items = NotificationLevel.values(); for (NotificationLevel item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ProvisioningState.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ProvisioningState.java index 2403d26ca8c3..407adb0c3e58 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ProvisioningState.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ProvisioningState.java @@ -55,7 +55,7 @@ public String toValue() { public static ProvisioningState fromValue(String value) { ProvisioningState[] items = ProvisioningState.values(); for (ProvisioningState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SiteAvailabilityState.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SiteAvailabilityState.java index f38d85954c65..1068547e9a99 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SiteAvailabilityState.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SiteAvailabilityState.java @@ -49,7 +49,7 @@ public String toValue() { public static SiteAvailabilityState fromValue(String value) { SiteAvailabilityState[] items = SiteAvailabilityState.values(); for (SiteAvailabilityState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SiteLoadBalancing.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SiteLoadBalancing.java index bf6fe833ae9f..43c7b1be6e6d 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SiteLoadBalancing.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SiteLoadBalancing.java @@ -55,7 +55,7 @@ public String toValue() { public static SiteLoadBalancing fromValue(String value) { SiteLoadBalancing[] items = SiteLoadBalancing.values(); for (SiteLoadBalancing item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SslState.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SslState.java index aebe404ae97f..1c80fa543f61 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SslState.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SslState.java @@ -49,7 +49,7 @@ public String toValue() { public static SslState fromValue(String value) { SslState[] items = SslState.values(); for (SslState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/StatusOptions.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/StatusOptions.java index 9ec993523c2a..94423b5d4dc2 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/StatusOptions.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/StatusOptions.java @@ -46,7 +46,7 @@ public String toValue() { public static StatusOptions fromValue(String value) { StatusOptions[] items = StatusOptions.values(); for (StatusOptions item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UnauthenticatedClientAction.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UnauthenticatedClientAction.java index 7e6a9bca10eb..27b6e6d39040 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UnauthenticatedClientAction.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UnauthenticatedClientAction.java @@ -46,7 +46,7 @@ public String toValue() { public static UnauthenticatedClientAction fromValue(String value) { UnauthenticatedClientAction[] items = UnauthenticatedClientAction.values(); for (UnauthenticatedClientAction item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UsageState.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UsageState.java index 8d1b1cebcc7a..790fc3332bb7 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UsageState.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UsageState.java @@ -46,7 +46,7 @@ public String toValue() { public static UsageState fromValue(String value) { UsageState[] items = UsageState.values(); for (UsageState item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/WorkerSizeOptions.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/WorkerSizeOptions.java index b2a734903a26..85408395d78c 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/WorkerSizeOptions.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/WorkerSizeOptions.java @@ -52,7 +52,7 @@ public String toValue() { public static WorkerSizeOptions fromValue(String value) { WorkerSizeOptions[] items = WorkerSizeOptions.values(); for (WorkerSizeOptions item : items) { - if (item.toValue().equals(value)) { + if (item.toValue().equalsIgnoreCase(value)) { return item; } } From 0d3a0ec9e91422e9331f034298c75457af8e2d73 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 16 Jun 2016 16:27:38 -0700 Subject: [PATCH 4/4] Fixes #766 remove toValue() on enums --- .../batch/protocol/models/AllocationState.java | 17 ++++------------- .../protocol/models/CertificateFormat.java | 17 ++++------------- .../batch/protocol/models/CertificateState.java | 17 ++++------------- .../models/CertificateStoreLocation.java | 17 ++++------------- .../protocol/models/CertificateVisibility.java | 17 ++++------------- .../models/ComputeNodeDeallocationOption.java | 17 ++++------------- .../protocol/models/ComputeNodeFillType.java | 17 ++++------------- .../models/ComputeNodeRebootOption.java | 17 ++++------------- .../models/ComputeNodeReimageOption.java | 17 ++++------------- .../batch/protocol/models/ComputeNodeState.java | 17 ++++------------- .../DisableComputeNodeSchedulingOption.java | 17 ++++------------- .../batch/protocol/models/DisableJobOption.java | 17 ++++------------- .../models/JobPreparationTaskState.java | 17 ++++------------- .../protocol/models/JobReleaseTaskState.java | 17 ++++------------- .../batch/protocol/models/JobScheduleState.java | 17 ++++------------- .../azure/batch/protocol/models/JobState.java | 17 ++++------------- .../azure/batch/protocol/models/OSType.java | 17 ++++------------- .../protocol/models/PoolLifetimeOption.java | 17 ++++------------- .../azure/batch/protocol/models/PoolState.java | 17 ++++------------- .../models/SchedulingErrorCategory.java | 17 ++++------------- .../batch/protocol/models/SchedulingState.java | 17 ++++------------- .../batch/protocol/models/StartTaskState.java | 17 ++++------------- .../batch/protocol/models/TaskAddStatus.java | 17 ++++------------- .../azure/batch/protocol/models/TaskState.java | 17 ++++------------- .../implementation/api/CachingTypes.java | 17 ++++------------- .../implementation/api/ComponentNames.java | 17 ++++------------- .../api/DiskCreateOptionTypes.java | 17 ++++------------- .../implementation/api/ForceUpdateTagTypes.java | 17 ++++------------- .../implementation/api/InstanceViewTypes.java | 17 ++++------------- .../api/OperatingSystemTypes.java | 17 ++++------------- .../compute/implementation/api/PassNames.java | 17 ++++------------- .../implementation/api/ProtocolTypes.java | 17 ++++------------- .../implementation/api/SettingNames.java | 17 ++++------------- .../implementation/api/StatusLevelTypes.java | 17 ++++------------- .../compute/implementation/api/UpgradeMode.java | 17 ++++------------- .../api/VirtualMachineScaleSetSkuScaleType.java | 17 ++++------------- .../datalake/analytics/models/CompileMode.java | 17 ++++------------- .../models/DataLakeAnalyticsAccountState.java | 17 ++++------------- .../models/DataLakeAnalyticsAccountStatus.java | 17 ++++------------- .../datalake/analytics/models/FileType.java | 17 ++++------------- .../analytics/models/JobResourceType.java | 17 ++++------------- .../datalake/analytics/models/JobResult.java | 17 ++++------------- .../datalake/analytics/models/JobState.java | 17 ++++------------- .../datalake/analytics/models/JobType.java | 17 ++++------------- .../analytics/models/OperationStatus.java | 17 ++++------------- .../analytics/models/SeverityTypes.java | 17 ++++------------- .../datalake/store/models/AppendModeType.java | 17 ++++------------- .../store/models/DataLakeStoreAccountState.java | 17 ++++------------- .../models/DataLakeStoreAccountStatus.java | 17 ++++------------- .../datalake/store/models/FileType.java | 17 ++++------------- .../datalake/store/models/OperationStatus.java | 17 ++++------------- .../api/NetworkInterfaceIPConfiguration.java | 6 +++--- .../implementation/api/DeploymentMode.java | 17 ++++------------- .../storage/implementation/api/AccessTier.java | 17 ++++------------- .../implementation/api/AccountStatus.java | 17 ++++------------- .../implementation/api/KeyPermission.java | 17 ++++------------- .../storage/implementation/api/Kind.java | 17 ++++------------- .../implementation/api/ProvisioningState.java | 17 ++++------------- .../storage/implementation/api/Reason.java | 17 ++++------------- .../storage/implementation/api/SkuName.java | 17 ++++------------- .../storage/implementation/api/SkuTier.java | 17 ++++------------- .../storage/implementation/api/UsageUnit.java | 17 ++++------------- .../api/AccessControlEntryAction.java | 17 ++++------------- .../implementation/api/AutoHealActionType.java | 17 ++++------------- .../implementation/api/AzureResourceType.java | 17 ++++------------- .../implementation/api/BackupItemStatus.java | 17 ++++------------- .../api/BackupRestoreOperationType.java | 17 ++++------------- .../api/BuiltInAuthenticationProvider.java | 17 ++++------------- .../api/CertificateOrderActionType.java | 17 ++++------------- .../api/CertificateOrderStatus.java | 17 ++++------------- .../api/CertificateProductType.java | 17 ++++------------- .../website/implementation/api/Channels.java | 17 ++++------------- .../implementation/api/CloneAbilityResult.java | 17 ++++------------- .../implementation/api/ComputeModeOptions.java | 17 ++++------------- .../api/CustomHostNameDnsRecordType.java | 17 ++++------------- .../implementation/api/DatabaseServerType.java | 17 ++++------------- .../implementation/api/DomainStatus.java | 17 ++++------------- .../website/implementation/api/DomainType.java | 17 ++++------------- .../implementation/api/FrequencyUnit.java | 17 ++++------------- .../implementation/api/HostNameType.java | 17 ++++------------- .../api/HostingEnvironmentStatus.java | 17 ++++------------- .../api/InternalLoadBalancingMode.java | 17 ++++------------- .../api/KeyVaultSecretStatus.java | 17 ++++------------- .../website/implementation/api/LogLevel.java | 17 ++++------------- .../api/ManagedHostingEnvironmentStatus.java | 17 ++++------------- .../implementation/api/ManagedPipelineMode.java | 17 ++++------------- .../implementation/api/NotificationLevel.java | 17 ++++------------- .../implementation/api/ProvisioningState.java | 17 ++++------------- .../api/SiteAvailabilityState.java | 17 ++++------------- .../implementation/api/SiteLoadBalancing.java | 17 ++++------------- .../website/implementation/api/SslState.java | 17 ++++------------- .../implementation/api/StatusOptions.java | 17 ++++------------- .../api/UnauthenticatedClientAction.java | 17 ++++------------- .../website/implementation/api/UsageState.java | 17 ++++------------- .../implementation/api/WorkerSizeOptions.java | 17 ++++------------- 95 files changed, 379 insertions(+), 1225 deletions(-) diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/AllocationState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/AllocationState.java index d7ddc2f55dec..cd14dd2fe0b4 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/AllocationState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/AllocationState.java @@ -29,16 +29,6 @@ public enum AllocationState { this.value = value; } - /** - * Gets the serialized value for a AllocationState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a AllocationState instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed AllocationState object, or null if unable to parse. */ @JsonCreator - public static AllocationState fromValue(String value) { + public static AllocationState fromString(String value) { AllocationState[] items = AllocationState.values(); for (AllocationState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateFormat.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateFormat.java index 3e458fea03a7..e23781e88fb5 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateFormat.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateFormat.java @@ -29,16 +29,6 @@ public enum CertificateFormat { this.value = value; } - /** - * Gets the serialized value for a CertificateFormat instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a CertificateFormat instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed CertificateFormat object, or null if unable to parse. */ @JsonCreator - public static CertificateFormat fromValue(String value) { + public static CertificateFormat fromString(String value) { CertificateFormat[] items = CertificateFormat.values(); for (CertificateFormat item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateState.java index d9037e5961f4..ee6b4f132e15 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateState.java @@ -29,16 +29,6 @@ public enum CertificateState { this.value = value; } - /** - * Gets the serialized value for a CertificateState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a CertificateState instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed CertificateState object, or null if unable to parse. */ @JsonCreator - public static CertificateState fromValue(String value) { + public static CertificateState fromString(String value) { CertificateState[] items = CertificateState.values(); for (CertificateState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateStoreLocation.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateStoreLocation.java index ed3971ed4cd4..38b6a23bb29d 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateStoreLocation.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateStoreLocation.java @@ -29,16 +29,6 @@ public enum CertificateStoreLocation { this.value = value; } - /** - * Gets the serialized value for a CertificateStoreLocation instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a CertificateStoreLocation instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed CertificateStoreLocation object, or null if unable to parse. */ @JsonCreator - public static CertificateStoreLocation fromValue(String value) { + public static CertificateStoreLocation fromString(String value) { CertificateStoreLocation[] items = CertificateStoreLocation.values(); for (CertificateStoreLocation item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateVisibility.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateVisibility.java index e1b889273789..a708774ce44c 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateVisibility.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/CertificateVisibility.java @@ -32,16 +32,6 @@ public enum CertificateVisibility { this.value = value; } - /** - * Gets the serialized value for a CertificateVisibility instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a CertificateVisibility instance. * @@ -49,18 +39,19 @@ public String toValue() { * @return the parsed CertificateVisibility object, or null if unable to parse. */ @JsonCreator - public static CertificateVisibility fromValue(String value) { + public static CertificateVisibility fromString(String value) { CertificateVisibility[] items = CertificateVisibility.values(); for (CertificateVisibility item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeDeallocationOption.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeDeallocationOption.java index 69e6c74c4623..433ac3584598 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeDeallocationOption.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeDeallocationOption.java @@ -32,16 +32,6 @@ public enum ComputeNodeDeallocationOption { this.value = value; } - /** - * Gets the serialized value for a ComputeNodeDeallocationOption instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a ComputeNodeDeallocationOption instance. * @@ -49,18 +39,19 @@ public String toValue() { * @return the parsed ComputeNodeDeallocationOption object, or null if unable to parse. */ @JsonCreator - public static ComputeNodeDeallocationOption fromValue(String value) { + public static ComputeNodeDeallocationOption fromString(String value) { ComputeNodeDeallocationOption[] items = ComputeNodeDeallocationOption.values(); for (ComputeNodeDeallocationOption item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeFillType.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeFillType.java index 5b9a3b20d35e..a1a0798725f4 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeFillType.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeFillType.java @@ -29,16 +29,6 @@ public enum ComputeNodeFillType { this.value = value; } - /** - * Gets the serialized value for a ComputeNodeFillType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a ComputeNodeFillType instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed ComputeNodeFillType object, or null if unable to parse. */ @JsonCreator - public static ComputeNodeFillType fromValue(String value) { + public static ComputeNodeFillType fromString(String value) { ComputeNodeFillType[] items = ComputeNodeFillType.values(); for (ComputeNodeFillType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeRebootOption.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeRebootOption.java index 86c88614c121..f21bf06a4da6 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeRebootOption.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeRebootOption.java @@ -32,16 +32,6 @@ public enum ComputeNodeRebootOption { this.value = value; } - /** - * Gets the serialized value for a ComputeNodeRebootOption instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a ComputeNodeRebootOption instance. * @@ -49,18 +39,19 @@ public String toValue() { * @return the parsed ComputeNodeRebootOption object, or null if unable to parse. */ @JsonCreator - public static ComputeNodeRebootOption fromValue(String value) { + public static ComputeNodeRebootOption fromString(String value) { ComputeNodeRebootOption[] items = ComputeNodeRebootOption.values(); for (ComputeNodeRebootOption item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeReimageOption.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeReimageOption.java index 4a47160a3f73..1b0823adb2c3 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeReimageOption.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeReimageOption.java @@ -32,16 +32,6 @@ public enum ComputeNodeReimageOption { this.value = value; } - /** - * Gets the serialized value for a ComputeNodeReimageOption instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a ComputeNodeReimageOption instance. * @@ -49,18 +39,19 @@ public String toValue() { * @return the parsed ComputeNodeReimageOption object, or null if unable to parse. */ @JsonCreator - public static ComputeNodeReimageOption fromValue(String value) { + public static ComputeNodeReimageOption fromString(String value) { ComputeNodeReimageOption[] items = ComputeNodeReimageOption.values(); for (ComputeNodeReimageOption item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeState.java index 48cb23f2b3be..4c53f550df99 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeState.java @@ -56,16 +56,6 @@ public enum ComputeNodeState { this.value = value; } - /** - * Gets the serialized value for a ComputeNodeState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a ComputeNodeState instance. * @@ -73,18 +63,19 @@ public String toValue() { * @return the parsed ComputeNodeState object, or null if unable to parse. */ @JsonCreator - public static ComputeNodeState fromValue(String value) { + public static ComputeNodeState fromString(String value) { ComputeNodeState[] items = ComputeNodeState.values(); for (ComputeNodeState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/DisableComputeNodeSchedulingOption.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/DisableComputeNodeSchedulingOption.java index 1623a4c39ce6..98a9896cfca2 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/DisableComputeNodeSchedulingOption.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/DisableComputeNodeSchedulingOption.java @@ -29,16 +29,6 @@ public enum DisableComputeNodeSchedulingOption { this.value = value; } - /** - * Gets the serialized value for a DisableComputeNodeSchedulingOption instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a DisableComputeNodeSchedulingOption instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed DisableComputeNodeSchedulingOption object, or null if unable to parse. */ @JsonCreator - public static DisableComputeNodeSchedulingOption fromValue(String value) { + public static DisableComputeNodeSchedulingOption fromString(String value) { DisableComputeNodeSchedulingOption[] items = DisableComputeNodeSchedulingOption.values(); for (DisableComputeNodeSchedulingOption item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/DisableJobOption.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/DisableJobOption.java index f36389479e8f..61613ac78704 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/DisableJobOption.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/DisableJobOption.java @@ -29,16 +29,6 @@ public enum DisableJobOption { this.value = value; } - /** - * Gets the serialized value for a DisableJobOption instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a DisableJobOption instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed DisableJobOption object, or null if unable to parse. */ @JsonCreator - public static DisableJobOption fromValue(String value) { + public static DisableJobOption fromString(String value) { DisableJobOption[] items = DisableJobOption.values(); for (DisableJobOption item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobPreparationTaskState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobPreparationTaskState.java index 0aa0ba003a38..aa80d5f48e79 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobPreparationTaskState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobPreparationTaskState.java @@ -26,16 +26,6 @@ public enum JobPreparationTaskState { this.value = value; } - /** - * Gets the serialized value for a JobPreparationTaskState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a JobPreparationTaskState instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed JobPreparationTaskState object, or null if unable to parse. */ @JsonCreator - public static JobPreparationTaskState fromValue(String value) { + public static JobPreparationTaskState fromString(String value) { JobPreparationTaskState[] items = JobPreparationTaskState.values(); for (JobPreparationTaskState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobReleaseTaskState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobReleaseTaskState.java index 1e14c439850b..0d95072b3deb 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobReleaseTaskState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobReleaseTaskState.java @@ -26,16 +26,6 @@ public enum JobReleaseTaskState { this.value = value; } - /** - * Gets the serialized value for a JobReleaseTaskState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a JobReleaseTaskState instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed JobReleaseTaskState object, or null if unable to parse. */ @JsonCreator - public static JobReleaseTaskState fromValue(String value) { + public static JobReleaseTaskState fromString(String value) { JobReleaseTaskState[] items = JobReleaseTaskState.values(); for (JobReleaseTaskState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobScheduleState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobScheduleState.java index 343ff572c966..59ef7c3a4333 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobScheduleState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobScheduleState.java @@ -35,16 +35,6 @@ public enum JobScheduleState { this.value = value; } - /** - * Gets the serialized value for a JobScheduleState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a JobScheduleState instance. * @@ -52,18 +42,19 @@ public String toValue() { * @return the parsed JobScheduleState object, or null if unable to parse. */ @JsonCreator - public static JobScheduleState fromValue(String value) { + public static JobScheduleState fromString(String value) { JobScheduleState[] items = JobScheduleState.values(); for (JobScheduleState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobState.java index 28dbed15c49c..979aa7ecd11d 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobState.java @@ -41,16 +41,6 @@ public enum JobState { this.value = value; } - /** - * Gets the serialized value for a JobState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a JobState instance. * @@ -58,18 +48,19 @@ public String toValue() { * @return the parsed JobState object, or null if unable to parse. */ @JsonCreator - public static JobState fromValue(String value) { + public static JobState fromString(String value) { JobState[] items = JobState.values(); for (JobState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/OSType.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/OSType.java index 76be61ed47f5..a25cfefecb0e 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/OSType.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/OSType.java @@ -29,16 +29,6 @@ public enum OSType { this.value = value; } - /** - * Gets the serialized value for a OSType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a OSType instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed OSType object, or null if unable to parse. */ @JsonCreator - public static OSType fromValue(String value) { + public static OSType fromString(String value) { OSType[] items = OSType.values(); for (OSType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolLifetimeOption.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolLifetimeOption.java index 792b88d4693c..487ccf319d89 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolLifetimeOption.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolLifetimeOption.java @@ -29,16 +29,6 @@ public enum PoolLifetimeOption { this.value = value; } - /** - * Gets the serialized value for a PoolLifetimeOption instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a PoolLifetimeOption instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed PoolLifetimeOption object, or null if unable to parse. */ @JsonCreator - public static PoolLifetimeOption fromValue(String value) { + public static PoolLifetimeOption fromString(String value) { PoolLifetimeOption[] items = PoolLifetimeOption.values(); for (PoolLifetimeOption item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolState.java index d9c588c22e4e..9a0315dae060 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolState.java @@ -29,16 +29,6 @@ public enum PoolState { this.value = value; } - /** - * Gets the serialized value for a PoolState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a PoolState instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed PoolState object, or null if unable to parse. */ @JsonCreator - public static PoolState fromValue(String value) { + public static PoolState fromString(String value) { PoolState[] items = PoolState.values(); for (PoolState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/SchedulingErrorCategory.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/SchedulingErrorCategory.java index 74da1a35f4d3..78a1badccc4f 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/SchedulingErrorCategory.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/SchedulingErrorCategory.java @@ -29,16 +29,6 @@ public enum SchedulingErrorCategory { this.value = value; } - /** - * Gets the serialized value for a SchedulingErrorCategory instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a SchedulingErrorCategory instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed SchedulingErrorCategory object, or null if unable to parse. */ @JsonCreator - public static SchedulingErrorCategory fromValue(String value) { + public static SchedulingErrorCategory fromString(String value) { SchedulingErrorCategory[] items = SchedulingErrorCategory.values(); for (SchedulingErrorCategory item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/SchedulingState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/SchedulingState.java index ff3c48586585..2a7a8d4b783c 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/SchedulingState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/SchedulingState.java @@ -26,16 +26,6 @@ public enum SchedulingState { this.value = value; } - /** - * Gets the serialized value for a SchedulingState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a SchedulingState instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed SchedulingState object, or null if unable to parse. */ @JsonCreator - public static SchedulingState fromValue(String value) { + public static SchedulingState fromString(String value) { SchedulingState[] items = SchedulingState.values(); for (SchedulingState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/StartTaskState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/StartTaskState.java index ae2152c8dbf4..5cf0fc93da43 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/StartTaskState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/StartTaskState.java @@ -26,16 +26,6 @@ public enum StartTaskState { this.value = value; } - /** - * Gets the serialized value for a StartTaskState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a StartTaskState instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed StartTaskState object, or null if unable to parse. */ @JsonCreator - public static StartTaskState fromValue(String value) { + public static StartTaskState fromString(String value) { StartTaskState[] items = StartTaskState.values(); for (StartTaskState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/TaskAddStatus.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/TaskAddStatus.java index 2517a45c06a1..d3ffa42afdb3 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/TaskAddStatus.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/TaskAddStatus.java @@ -32,16 +32,6 @@ public enum TaskAddStatus { this.value = value; } - /** - * Gets the serialized value for a TaskAddStatus instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a TaskAddStatus instance. * @@ -49,18 +39,19 @@ public String toValue() { * @return the parsed TaskAddStatus object, or null if unable to parse. */ @JsonCreator - public static TaskAddStatus fromValue(String value) { + public static TaskAddStatus fromString(String value) { TaskAddStatus[] items = TaskAddStatus.values(); for (TaskAddStatus item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/TaskState.java b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/TaskState.java index 2730ba6d137a..8eecaea0cf6d 100644 --- a/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/TaskState.java +++ b/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/TaskState.java @@ -32,16 +32,6 @@ public enum TaskState { this.value = value; } - /** - * Gets the serialized value for a TaskState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a TaskState instance. * @@ -49,18 +39,19 @@ public String toValue() { * @return the parsed TaskState object, or null if unable to parse. */ @JsonCreator - public static TaskState fromValue(String value) { + public static TaskState fromString(String value) { TaskState[] items = TaskState.values(); for (TaskState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/CachingTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/CachingTypes.java index b89bbb66efaf..e3a218bfdbf5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/CachingTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/CachingTypes.java @@ -29,16 +29,6 @@ public enum CachingTypes { this.value = value; } - /** - * Gets the serialized value for a CachingTypes instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a CachingTypes instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed CachingTypes object, or null if unable to parse. */ @JsonCreator - public static CachingTypes fromValue(String value) { + public static CachingTypes fromString(String value) { CachingTypes[] items = CachingTypes.values(); for (CachingTypes item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ComponentNames.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ComponentNames.java index ac1cc1a31485..8e06d28321b4 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ComponentNames.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ComponentNames.java @@ -23,16 +23,6 @@ public enum ComponentNames { this.value = value; } - /** - * Gets the serialized value for a ComponentNames instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a ComponentNames instance. * @@ -40,18 +30,19 @@ public String toValue() { * @return the parsed ComponentNames object, or null if unable to parse. */ @JsonCreator - public static ComponentNames fromValue(String value) { + public static ComponentNames fromString(String value) { ComponentNames[] items = ComponentNames.values(); for (ComponentNames item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/DiskCreateOptionTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/DiskCreateOptionTypes.java index abe36786eda6..ac383d79608c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/DiskCreateOptionTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/DiskCreateOptionTypes.java @@ -29,16 +29,6 @@ public enum DiskCreateOptionTypes { this.value = value; } - /** - * Gets the serialized value for a DiskCreateOptionTypes instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a DiskCreateOptionTypes instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed DiskCreateOptionTypes object, or null if unable to parse. */ @JsonCreator - public static DiskCreateOptionTypes fromValue(String value) { + public static DiskCreateOptionTypes fromString(String value) { DiskCreateOptionTypes[] items = DiskCreateOptionTypes.values(); for (DiskCreateOptionTypes item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ForceUpdateTagTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ForceUpdateTagTypes.java index c228e7be7ae7..ae08d4eeedb8 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ForceUpdateTagTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ForceUpdateTagTypes.java @@ -23,16 +23,6 @@ public enum ForceUpdateTagTypes { this.value = value; } - /** - * Gets the serialized value for a ForceUpdateTagTypes instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a ForceUpdateTagTypes instance. * @@ -40,18 +30,19 @@ public String toValue() { * @return the parsed ForceUpdateTagTypes object, or null if unable to parse. */ @JsonCreator - public static ForceUpdateTagTypes fromValue(String value) { + public static ForceUpdateTagTypes fromString(String value) { ForceUpdateTagTypes[] items = ForceUpdateTagTypes.values(); for (ForceUpdateTagTypes item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/InstanceViewTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/InstanceViewTypes.java index 8c842230491b..f2561384cc39 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/InstanceViewTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/InstanceViewTypes.java @@ -23,16 +23,6 @@ public enum InstanceViewTypes { this.value = value; } - /** - * Gets the serialized value for a InstanceViewTypes instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a InstanceViewTypes instance. * @@ -40,18 +30,19 @@ public String toValue() { * @return the parsed InstanceViewTypes object, or null if unable to parse. */ @JsonCreator - public static InstanceViewTypes fromValue(String value) { + public static InstanceViewTypes fromString(String value) { InstanceViewTypes[] items = InstanceViewTypes.values(); for (InstanceViewTypes item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/OperatingSystemTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/OperatingSystemTypes.java index bf1e169b39be..c8b63543085e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/OperatingSystemTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/OperatingSystemTypes.java @@ -26,16 +26,6 @@ public enum OperatingSystemTypes { this.value = value; } - /** - * Gets the serialized value for a OperatingSystemTypes instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a OperatingSystemTypes instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed OperatingSystemTypes object, or null if unable to parse. */ @JsonCreator - public static OperatingSystemTypes fromValue(String value) { + public static OperatingSystemTypes fromString(String value) { OperatingSystemTypes[] items = OperatingSystemTypes.values(); for (OperatingSystemTypes item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/PassNames.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/PassNames.java index 72514facb830..58d18e33f45a 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/PassNames.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/PassNames.java @@ -23,16 +23,6 @@ public enum PassNames { this.value = value; } - /** - * Gets the serialized value for a PassNames instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a PassNames instance. * @@ -40,18 +30,19 @@ public String toValue() { * @return the parsed PassNames object, or null if unable to parse. */ @JsonCreator - public static PassNames fromValue(String value) { + public static PassNames fromString(String value) { PassNames[] items = PassNames.values(); for (PassNames item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ProtocolTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ProtocolTypes.java index eba877e99d75..7a1e015e01fb 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ProtocolTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/ProtocolTypes.java @@ -26,16 +26,6 @@ public enum ProtocolTypes { this.value = value; } - /** - * Gets the serialized value for a ProtocolTypes instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a ProtocolTypes instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed ProtocolTypes object, or null if unable to parse. */ @JsonCreator - public static ProtocolTypes fromValue(String value) { + public static ProtocolTypes fromString(String value) { ProtocolTypes[] items = ProtocolTypes.values(); for (ProtocolTypes item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/SettingNames.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/SettingNames.java index 455cd47abf19..06257eaac907 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/SettingNames.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/SettingNames.java @@ -26,16 +26,6 @@ public enum SettingNames { this.value = value; } - /** - * Gets the serialized value for a SettingNames instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a SettingNames instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed SettingNames object, or null if unable to parse. */ @JsonCreator - public static SettingNames fromValue(String value) { + public static SettingNames fromString(String value) { SettingNames[] items = SettingNames.values(); for (SettingNames item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/StatusLevelTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/StatusLevelTypes.java index 04ad6b4956b7..0c790e166118 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/StatusLevelTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/StatusLevelTypes.java @@ -29,16 +29,6 @@ public enum StatusLevelTypes { this.value = value; } - /** - * Gets the serialized value for a StatusLevelTypes instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a StatusLevelTypes instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed StatusLevelTypes object, or null if unable to parse. */ @JsonCreator - public static StatusLevelTypes fromValue(String value) { + public static StatusLevelTypes fromString(String value) { StatusLevelTypes[] items = StatusLevelTypes.values(); for (StatusLevelTypes item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/UpgradeMode.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/UpgradeMode.java index 8c9b929376e4..13df88734ec5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/UpgradeMode.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/UpgradeMode.java @@ -26,16 +26,6 @@ public enum UpgradeMode { this.value = value; } - /** - * Gets the serialized value for a UpgradeMode instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a UpgradeMode instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed UpgradeMode object, or null if unable to parse. */ @JsonCreator - public static UpgradeMode fromValue(String value) { + public static UpgradeMode fromString(String value) { UpgradeMode[] items = UpgradeMode.values(); for (UpgradeMode item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineScaleSetSkuScaleType.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineScaleSetSkuScaleType.java index ff32ff9e3d05..96cf06ee1b78 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineScaleSetSkuScaleType.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/api/VirtualMachineScaleSetSkuScaleType.java @@ -26,16 +26,6 @@ public enum VirtualMachineScaleSetSkuScaleType { this.value = value; } - /** - * Gets the serialized value for a VirtualMachineScaleSetSkuScaleType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a VirtualMachineScaleSetSkuScaleType instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed VirtualMachineScaleSetSkuScaleType object, or null if unable to parse. */ @JsonCreator - public static VirtualMachineScaleSetSkuScaleType fromValue(String value) { + public static VirtualMachineScaleSetSkuScaleType fromString(String value) { VirtualMachineScaleSetSkuScaleType[] items = VirtualMachineScaleSetSkuScaleType.values(); for (VirtualMachineScaleSetSkuScaleType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/CompileMode.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/CompileMode.java index 2e80f7dc1f10..795ec9f1fb32 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/CompileMode.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/CompileMode.java @@ -29,16 +29,6 @@ public enum CompileMode { this.value = value; } - /** - * Gets the serialized value for a CompileMode instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a CompileMode instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed CompileMode object, or null if unable to parse. */ @JsonCreator - public static CompileMode fromValue(String value) { + public static CompileMode fromString(String value) { CompileMode[] items = CompileMode.values(); for (CompileMode item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/DataLakeAnalyticsAccountState.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/DataLakeAnalyticsAccountState.java index 5249e8b38a47..3e60dbeaea81 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/DataLakeAnalyticsAccountState.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/DataLakeAnalyticsAccountState.java @@ -26,16 +26,6 @@ public enum DataLakeAnalyticsAccountState { this.value = value; } - /** - * Gets the serialized value for a DataLakeAnalyticsAccountState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a DataLakeAnalyticsAccountState instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed DataLakeAnalyticsAccountState object, or null if unable to parse. */ @JsonCreator - public static DataLakeAnalyticsAccountState fromValue(String value) { + public static DataLakeAnalyticsAccountState fromString(String value) { DataLakeAnalyticsAccountState[] items = DataLakeAnalyticsAccountState.values(); for (DataLakeAnalyticsAccountState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/DataLakeAnalyticsAccountStatus.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/DataLakeAnalyticsAccountStatus.java index 1d945345aad7..db8c7b98d6fb 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/DataLakeAnalyticsAccountStatus.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/DataLakeAnalyticsAccountStatus.java @@ -47,16 +47,6 @@ public enum DataLakeAnalyticsAccountStatus { this.value = value; } - /** - * Gets the serialized value for a DataLakeAnalyticsAccountStatus instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a DataLakeAnalyticsAccountStatus instance. * @@ -64,18 +54,19 @@ public String toValue() { * @return the parsed DataLakeAnalyticsAccountStatus object, or null if unable to parse. */ @JsonCreator - public static DataLakeAnalyticsAccountStatus fromValue(String value) { + public static DataLakeAnalyticsAccountStatus fromString(String value) { DataLakeAnalyticsAccountStatus[] items = DataLakeAnalyticsAccountStatus.values(); for (DataLakeAnalyticsAccountStatus item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/FileType.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/FileType.java index 81712e3ffb4d..e3ff4957daf2 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/FileType.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/FileType.java @@ -26,16 +26,6 @@ public enum FileType { this.value = value; } - /** - * Gets the serialized value for a FileType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a FileType instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed FileType object, or null if unable to parse. */ @JsonCreator - public static FileType fromValue(String value) { + public static FileType fromString(String value) { FileType[] items = FileType.values(); for (FileType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobResourceType.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobResourceType.java index 9a1aa6d1921f..8bd751621b2b 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobResourceType.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobResourceType.java @@ -38,16 +38,6 @@ public enum JobResourceType { this.value = value; } - /** - * Gets the serialized value for a JobResourceType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a JobResourceType instance. * @@ -55,18 +45,19 @@ public String toValue() { * @return the parsed JobResourceType object, or null if unable to parse. */ @JsonCreator - public static JobResourceType fromValue(String value) { + public static JobResourceType fromString(String value) { JobResourceType[] items = JobResourceType.values(); for (JobResourceType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobResult.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobResult.java index 642a5ccec36a..898bcd777c7d 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobResult.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobResult.java @@ -32,16 +32,6 @@ public enum JobResult { this.value = value; } - /** - * Gets the serialized value for a JobResult instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a JobResult instance. * @@ -49,18 +39,19 @@ public String toValue() { * @return the parsed JobResult object, or null if unable to parse. */ @JsonCreator - public static JobResult fromValue(String value) { + public static JobResult fromString(String value) { JobResult[] items = JobResult.values(); for (JobResult item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobState.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobState.java index 96ba37f81a3b..4de553635981 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobState.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobState.java @@ -50,16 +50,6 @@ public enum JobState { this.value = value; } - /** - * Gets the serialized value for a JobState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a JobState instance. * @@ -67,18 +57,19 @@ public String toValue() { * @return the parsed JobState object, or null if unable to parse. */ @JsonCreator - public static JobState fromValue(String value) { + public static JobState fromString(String value) { JobState[] items = JobState.values(); for (JobState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobType.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobType.java index b7be4e3b79ba..683cddf95e9f 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobType.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/JobType.java @@ -26,16 +26,6 @@ public enum JobType { this.value = value; } - /** - * Gets the serialized value for a JobType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a JobType instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed JobType object, or null if unable to parse. */ @JsonCreator - public static JobType fromValue(String value) { + public static JobType fromString(String value) { JobType[] items = JobType.values(); for (JobType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/OperationStatus.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/OperationStatus.java index 7a1c51b1e78b..608fe7f3c6b0 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/OperationStatus.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/OperationStatus.java @@ -29,16 +29,6 @@ public enum OperationStatus { this.value = value; } - /** - * Gets the serialized value for a OperationStatus instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a OperationStatus instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed OperationStatus object, or null if unable to parse. */ @JsonCreator - public static OperationStatus fromValue(String value) { + public static OperationStatus fromString(String value) { OperationStatus[] items = OperationStatus.values(); for (OperationStatus item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/SeverityTypes.java b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/SeverityTypes.java index 45571b8ad609..302566df860f 100644 --- a/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/SeverityTypes.java +++ b/azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/models/SeverityTypes.java @@ -29,16 +29,6 @@ public enum SeverityTypes { this.value = value; } - /** - * Gets the serialized value for a SeverityTypes instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a SeverityTypes instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed SeverityTypes object, or null if unable to parse. */ @JsonCreator - public static SeverityTypes fromValue(String value) { + public static SeverityTypes fromString(String value) { SeverityTypes[] items = SeverityTypes.values(); for (SeverityTypes item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/AppendModeType.java b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/AppendModeType.java index 07472e155147..7494a12273a9 100644 --- a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/AppendModeType.java +++ b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/AppendModeType.java @@ -23,16 +23,6 @@ public enum AppendModeType { this.value = value; } - /** - * Gets the serialized value for a AppendModeType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a AppendModeType instance. * @@ -40,18 +30,19 @@ public String toValue() { * @return the parsed AppendModeType object, or null if unable to parse. */ @JsonCreator - public static AppendModeType fromValue(String value) { + public static AppendModeType fromString(String value) { AppendModeType[] items = AppendModeType.values(); for (AppendModeType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/DataLakeStoreAccountState.java b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/DataLakeStoreAccountState.java index dd1b32020f85..b48b5e1d926e 100644 --- a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/DataLakeStoreAccountState.java +++ b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/DataLakeStoreAccountState.java @@ -26,16 +26,6 @@ public enum DataLakeStoreAccountState { this.value = value; } - /** - * Gets the serialized value for a DataLakeStoreAccountState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a DataLakeStoreAccountState instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed DataLakeStoreAccountState object, or null if unable to parse. */ @JsonCreator - public static DataLakeStoreAccountState fromValue(String value) { + public static DataLakeStoreAccountState fromString(String value) { DataLakeStoreAccountState[] items = DataLakeStoreAccountState.values(); for (DataLakeStoreAccountState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/DataLakeStoreAccountStatus.java b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/DataLakeStoreAccountStatus.java index 47a58a4cae18..193e52c138ea 100644 --- a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/DataLakeStoreAccountStatus.java +++ b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/DataLakeStoreAccountStatus.java @@ -47,16 +47,6 @@ public enum DataLakeStoreAccountStatus { this.value = value; } - /** - * Gets the serialized value for a DataLakeStoreAccountStatus instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a DataLakeStoreAccountStatus instance. * @@ -64,18 +54,19 @@ public String toValue() { * @return the parsed DataLakeStoreAccountStatus object, or null if unable to parse. */ @JsonCreator - public static DataLakeStoreAccountStatus fromValue(String value) { + public static DataLakeStoreAccountStatus fromString(String value) { DataLakeStoreAccountStatus[] items = DataLakeStoreAccountStatus.values(); for (DataLakeStoreAccountStatus item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/FileType.java b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/FileType.java index ecf10c5725a0..c432a438c022 100644 --- a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/FileType.java +++ b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/FileType.java @@ -26,16 +26,6 @@ public enum FileType { this.value = value; } - /** - * Gets the serialized value for a FileType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a FileType instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed FileType object, or null if unable to parse. */ @JsonCreator - public static FileType fromValue(String value) { + public static FileType fromString(String value) { FileType[] items = FileType.values(); for (FileType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/OperationStatus.java b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/OperationStatus.java index 088dd78de2a3..259d55bfc0f0 100644 --- a/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/OperationStatus.java +++ b/azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/models/OperationStatus.java @@ -29,16 +29,6 @@ public enum OperationStatus { this.value = value; } - /** - * Gets the serialized value for a OperationStatus instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a OperationStatus instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed OperationStatus object, or null if unable to parse. */ @JsonCreator - public static OperationStatus fromValue(String value) { + public static OperationStatus fromString(String value) { OperationStatus[] items = OperationStatus.values(); for (OperationStatus item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkInterfaceIPConfiguration.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkInterfaceIPConfiguration.java index c86f3383d743..44973af4466d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkInterfaceIPConfiguration.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/api/NetworkInterfaceIPConfiguration.java @@ -51,7 +51,7 @@ public class NetworkInterfaceIPConfiguration extends SubResource { * The publicIPAddress property. */ @JsonProperty(value = "properties.publicIPAddress") - private PublicIPAddressInner publicIPAddress; + private SubResource publicIPAddress; /** * The provisioningState property. @@ -175,7 +175,7 @@ public NetworkInterfaceIPConfiguration withSubnet(SubnetInner subnet) { * * @return the publicIPAddress value */ - public PublicIPAddressInner publicIPAddress() { + public SubResource publicIPAddress() { return this.publicIPAddress; } @@ -185,7 +185,7 @@ public PublicIPAddressInner publicIPAddress() { * @param publicIPAddress the publicIPAddress value to set * @return the NetworkInterfaceIPConfiguration object itself. */ - public NetworkInterfaceIPConfiguration withPublicIPAddress(PublicIPAddressInner publicIPAddress) { + public NetworkInterfaceIPConfiguration withPublicIPAddress(SubResource publicIPAddress) { this.publicIPAddress = publicIPAddress; return this; } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/DeploymentMode.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/DeploymentMode.java index 0e18399337c2..550b8354b953 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/DeploymentMode.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/api/DeploymentMode.java @@ -26,16 +26,6 @@ public enum DeploymentMode { this.value = value; } - /** - * Gets the serialized value for a DeploymentMode instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a DeploymentMode instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed DeploymentMode object, or null if unable to parse. */ @JsonCreator - public static DeploymentMode fromValue(String value) { + public static DeploymentMode fromString(String value) { DeploymentMode[] items = DeploymentMode.values(); for (DeploymentMode item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/AccessTier.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/AccessTier.java index 637579e53437..dd5e5dcce6e1 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/AccessTier.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/AccessTier.java @@ -26,16 +26,6 @@ public enum AccessTier { this.value = value; } - /** - * Gets the serialized value for a AccessTier instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a AccessTier instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed AccessTier object, or null if unable to parse. */ @JsonCreator - public static AccessTier fromValue(String value) { + public static AccessTier fromString(String value) { AccessTier[] items = AccessTier.values(); for (AccessTier item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/AccountStatus.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/AccountStatus.java index 41fede6adae3..24ed7f6fd7fc 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/AccountStatus.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/AccountStatus.java @@ -26,16 +26,6 @@ public enum AccountStatus { this.value = value; } - /** - * Gets the serialized value for a AccountStatus instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a AccountStatus instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed AccountStatus object, or null if unable to parse. */ @JsonCreator - public static AccountStatus fromValue(String value) { + public static AccountStatus fromString(String value) { AccountStatus[] items = AccountStatus.values(); for (AccountStatus item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/KeyPermission.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/KeyPermission.java index 67b74bca8719..f2061c26d6bc 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/KeyPermission.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/KeyPermission.java @@ -26,16 +26,6 @@ public enum KeyPermission { this.value = value; } - /** - * Gets the serialized value for a KeyPermission instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a KeyPermission instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed KeyPermission object, or null if unable to parse. */ @JsonCreator - public static KeyPermission fromValue(String value) { + public static KeyPermission fromString(String value) { KeyPermission[] items = KeyPermission.values(); for (KeyPermission item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/Kind.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/Kind.java index fdaa147e9f12..3805d2c12f7d 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/Kind.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/Kind.java @@ -26,16 +26,6 @@ public enum Kind { this.value = value; } - /** - * Gets the serialized value for a Kind instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a Kind instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed Kind object, or null if unable to parse. */ @JsonCreator - public static Kind fromValue(String value) { + public static Kind fromString(String value) { Kind[] items = Kind.values(); for (Kind item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/ProvisioningState.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/ProvisioningState.java index a7638925b9e7..d48bdee80fc3 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/ProvisioningState.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/ProvisioningState.java @@ -29,16 +29,6 @@ public enum ProvisioningState { this.value = value; } - /** - * Gets the serialized value for a ProvisioningState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a ProvisioningState instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed ProvisioningState object, or null if unable to parse. */ @JsonCreator - public static ProvisioningState fromValue(String value) { + public static ProvisioningState fromString(String value) { ProvisioningState[] items = ProvisioningState.values(); for (ProvisioningState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/Reason.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/Reason.java index 9e69b1d96522..f7cc09485da6 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/Reason.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/Reason.java @@ -26,16 +26,6 @@ public enum Reason { this.value = value; } - /** - * Gets the serialized value for a Reason instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a Reason instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed Reason object, or null if unable to parse. */ @JsonCreator - public static Reason fromValue(String value) { + public static Reason fromString(String value) { Reason[] items = Reason.values(); for (Reason item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/SkuName.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/SkuName.java index 59a9858ba57d..8d878f8ffb7b 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/SkuName.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/SkuName.java @@ -35,16 +35,6 @@ public enum SkuName { this.value = value; } - /** - * Gets the serialized value for a SkuName instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a SkuName instance. * @@ -52,18 +42,19 @@ public String toValue() { * @return the parsed SkuName object, or null if unable to parse. */ @JsonCreator - public static SkuName fromValue(String value) { + public static SkuName fromString(String value) { SkuName[] items = SkuName.values(); for (SkuName item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/SkuTier.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/SkuTier.java index 79a9e12853b2..925be5d6ea6f 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/SkuTier.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/SkuTier.java @@ -26,16 +26,6 @@ public enum SkuTier { this.value = value; } - /** - * Gets the serialized value for a SkuTier instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a SkuTier instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed SkuTier object, or null if unable to parse. */ @JsonCreator - public static SkuTier fromValue(String value) { + public static SkuTier fromString(String value) { SkuTier[] items = SkuTier.values(); for (SkuTier item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/UsageUnit.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/UsageUnit.java index 05d916b20c72..c78e5e2c2b32 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/UsageUnit.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/api/UsageUnit.java @@ -38,16 +38,6 @@ public enum UsageUnit { this.value = value; } - /** - * Gets the serialized value for a UsageUnit instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a UsageUnit instance. * @@ -55,18 +45,19 @@ public String toValue() { * @return the parsed UsageUnit object, or null if unable to parse. */ @JsonCreator - public static UsageUnit fromValue(String value) { + public static UsageUnit fromString(String value) { UsageUnit[] items = UsageUnit.values(); for (UsageUnit item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AccessControlEntryAction.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AccessControlEntryAction.java index eeb5153e135c..26ce54a55d03 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AccessControlEntryAction.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AccessControlEntryAction.java @@ -26,16 +26,6 @@ public enum AccessControlEntryAction { this.value = value; } - /** - * Gets the serialized value for a AccessControlEntryAction instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a AccessControlEntryAction instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed AccessControlEntryAction object, or null if unable to parse. */ @JsonCreator - public static AccessControlEntryAction fromValue(String value) { + public static AccessControlEntryAction fromString(String value) { AccessControlEntryAction[] items = AccessControlEntryAction.values(); for (AccessControlEntryAction item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AutoHealActionType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AutoHealActionType.java index c60a3ce52d4e..096dfb8ff506 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AutoHealActionType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AutoHealActionType.java @@ -29,16 +29,6 @@ public enum AutoHealActionType { this.value = value; } - /** - * Gets the serialized value for a AutoHealActionType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a AutoHealActionType instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed AutoHealActionType object, or null if unable to parse. */ @JsonCreator - public static AutoHealActionType fromValue(String value) { + public static AutoHealActionType fromString(String value) { AutoHealActionType[] items = AutoHealActionType.values(); for (AutoHealActionType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AzureResourceType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AzureResourceType.java index 81022d3287e8..3a2c870d8c12 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AzureResourceType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/AzureResourceType.java @@ -26,16 +26,6 @@ public enum AzureResourceType { this.value = value; } - /** - * Gets the serialized value for a AzureResourceType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a AzureResourceType instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed AzureResourceType object, or null if unable to parse. */ @JsonCreator - public static AzureResourceType fromValue(String value) { + public static AzureResourceType fromString(String value) { AzureResourceType[] items = AzureResourceType.values(); for (AzureResourceType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BackupItemStatus.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BackupItemStatus.java index b4016623ee26..39c2b98e339a 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BackupItemStatus.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BackupItemStatus.java @@ -50,16 +50,6 @@ public enum BackupItemStatus { this.value = value; } - /** - * Gets the serialized value for a BackupItemStatus instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a BackupItemStatus instance. * @@ -67,18 +57,19 @@ public String toValue() { * @return the parsed BackupItemStatus object, or null if unable to parse. */ @JsonCreator - public static BackupItemStatus fromValue(String value) { + public static BackupItemStatus fromString(String value) { BackupItemStatus[] items = BackupItemStatus.values(); for (BackupItemStatus item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BackupRestoreOperationType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BackupRestoreOperationType.java index 02725b9ff3f5..2d3049181db8 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BackupRestoreOperationType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BackupRestoreOperationType.java @@ -29,16 +29,6 @@ public enum BackupRestoreOperationType { this.value = value; } - /** - * Gets the serialized value for a BackupRestoreOperationType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a BackupRestoreOperationType instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed BackupRestoreOperationType object, or null if unable to parse. */ @JsonCreator - public static BackupRestoreOperationType fromValue(String value) { + public static BackupRestoreOperationType fromString(String value) { BackupRestoreOperationType[] items = BackupRestoreOperationType.values(); for (BackupRestoreOperationType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BuiltInAuthenticationProvider.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BuiltInAuthenticationProvider.java index 3aeb79b6c74e..b80f9a01a515 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BuiltInAuthenticationProvider.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/BuiltInAuthenticationProvider.java @@ -35,16 +35,6 @@ public enum BuiltInAuthenticationProvider { this.value = value; } - /** - * Gets the serialized value for a BuiltInAuthenticationProvider instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a BuiltInAuthenticationProvider instance. * @@ -52,18 +42,19 @@ public String toValue() { * @return the parsed BuiltInAuthenticationProvider object, or null if unable to parse. */ @JsonCreator - public static BuiltInAuthenticationProvider fromValue(String value) { + public static BuiltInAuthenticationProvider fromString(String value) { BuiltInAuthenticationProvider[] items = BuiltInAuthenticationProvider.values(); for (BuiltInAuthenticationProvider item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrderActionType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrderActionType.java index 681f3aa7ecb6..e9fdcf0cbcfe 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrderActionType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrderActionType.java @@ -47,16 +47,6 @@ public enum CertificateOrderActionType { this.value = value; } - /** - * Gets the serialized value for a CertificateOrderActionType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a CertificateOrderActionType instance. * @@ -64,18 +54,19 @@ public String toValue() { * @return the parsed CertificateOrderActionType object, or null if unable to parse. */ @JsonCreator - public static CertificateOrderActionType fromValue(String value) { + public static CertificateOrderActionType fromString(String value) { CertificateOrderActionType[] items = CertificateOrderActionType.values(); for (CertificateOrderActionType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrderStatus.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrderStatus.java index 0c7d5f128691..718cf42704dc 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrderStatus.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateOrderStatus.java @@ -50,16 +50,6 @@ public enum CertificateOrderStatus { this.value = value; } - /** - * Gets the serialized value for a CertificateOrderStatus instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a CertificateOrderStatus instance. * @@ -67,18 +57,19 @@ public String toValue() { * @return the parsed CertificateOrderStatus object, or null if unable to parse. */ @JsonCreator - public static CertificateOrderStatus fromValue(String value) { + public static CertificateOrderStatus fromString(String value) { CertificateOrderStatus[] items = CertificateOrderStatus.values(); for (CertificateOrderStatus item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateProductType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateProductType.java index d9f51564a165..3ab9470a2e20 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateProductType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CertificateProductType.java @@ -26,16 +26,6 @@ public enum CertificateProductType { this.value = value; } - /** - * Gets the serialized value for a CertificateProductType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a CertificateProductType instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed CertificateProductType object, or null if unable to parse. */ @JsonCreator - public static CertificateProductType fromValue(String value) { + public static CertificateProductType fromString(String value) { CertificateProductType[] items = CertificateProductType.values(); for (CertificateProductType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/Channels.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/Channels.java index cbb9ea337656..1640cd1fd4b8 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/Channels.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/Channels.java @@ -32,16 +32,6 @@ public enum Channels { this.value = value; } - /** - * Gets the serialized value for a Channels instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a Channels instance. * @@ -49,18 +39,19 @@ public String toValue() { * @return the parsed Channels object, or null if unable to parse. */ @JsonCreator - public static Channels fromValue(String value) { + public static Channels fromString(String value) { Channels[] items = Channels.values(); for (Channels item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CloneAbilityResult.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CloneAbilityResult.java index ff70e08ba317..6809fea2af9f 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CloneAbilityResult.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CloneAbilityResult.java @@ -29,16 +29,6 @@ public enum CloneAbilityResult { this.value = value; } - /** - * Gets the serialized value for a CloneAbilityResult instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a CloneAbilityResult instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed CloneAbilityResult object, or null if unable to parse. */ @JsonCreator - public static CloneAbilityResult fromValue(String value) { + public static CloneAbilityResult fromString(String value) { CloneAbilityResult[] items = CloneAbilityResult.values(); for (CloneAbilityResult item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ComputeModeOptions.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ComputeModeOptions.java index efa6da71e98f..675829f54c0c 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ComputeModeOptions.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ComputeModeOptions.java @@ -29,16 +29,6 @@ public enum ComputeModeOptions { this.value = value; } - /** - * Gets the serialized value for a ComputeModeOptions instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a ComputeModeOptions instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed ComputeModeOptions object, or null if unable to parse. */ @JsonCreator - public static ComputeModeOptions fromValue(String value) { + public static ComputeModeOptions fromString(String value) { ComputeModeOptions[] items = ComputeModeOptions.values(); for (ComputeModeOptions item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CustomHostNameDnsRecordType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CustomHostNameDnsRecordType.java index 091bd428b910..818bdf247847 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CustomHostNameDnsRecordType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/CustomHostNameDnsRecordType.java @@ -26,16 +26,6 @@ public enum CustomHostNameDnsRecordType { this.value = value; } - /** - * Gets the serialized value for a CustomHostNameDnsRecordType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a CustomHostNameDnsRecordType instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed CustomHostNameDnsRecordType object, or null if unable to parse. */ @JsonCreator - public static CustomHostNameDnsRecordType fromValue(String value) { + public static CustomHostNameDnsRecordType fromString(String value) { CustomHostNameDnsRecordType[] items = CustomHostNameDnsRecordType.values(); for (CustomHostNameDnsRecordType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DatabaseServerType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DatabaseServerType.java index 34ba47eff674..ffc390bc7ffe 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DatabaseServerType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DatabaseServerType.java @@ -32,16 +32,6 @@ public enum DatabaseServerType { this.value = value; } - /** - * Gets the serialized value for a DatabaseServerType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a DatabaseServerType instance. * @@ -49,18 +39,19 @@ public String toValue() { * @return the parsed DatabaseServerType object, or null if unable to parse. */ @JsonCreator - public static DatabaseServerType fromValue(String value) { + public static DatabaseServerType fromString(String value) { DatabaseServerType[] items = DatabaseServerType.values(); for (DatabaseServerType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainStatus.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainStatus.java index 0a6ba4f46a03..42753f51a85b 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainStatus.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainStatus.java @@ -83,16 +83,6 @@ public enum DomainStatus { this.value = value; } - /** - * Gets the serialized value for a DomainStatus instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a DomainStatus instance. * @@ -100,18 +90,19 @@ public String toValue() { * @return the parsed DomainStatus object, or null if unable to parse. */ @JsonCreator - public static DomainStatus fromValue(String value) { + public static DomainStatus fromString(String value) { DomainStatus[] items = DomainStatus.values(); for (DomainStatus item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainType.java index cd2c2e8324c5..a4efe9c5b2fe 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/DomainType.java @@ -26,16 +26,6 @@ public enum DomainType { this.value = value; } - /** - * Gets the serialized value for a DomainType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a DomainType instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed DomainType object, or null if unable to parse. */ @JsonCreator - public static DomainType fromValue(String value) { + public static DomainType fromString(String value) { DomainType[] items = DomainType.values(); for (DomainType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/FrequencyUnit.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/FrequencyUnit.java index abf2b4db5caa..8adad0d8c9ff 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/FrequencyUnit.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/FrequencyUnit.java @@ -26,16 +26,6 @@ public enum FrequencyUnit { this.value = value; } - /** - * Gets the serialized value for a FrequencyUnit instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a FrequencyUnit instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed FrequencyUnit object, or null if unable to parse. */ @JsonCreator - public static FrequencyUnit fromValue(String value) { + public static FrequencyUnit fromString(String value) { FrequencyUnit[] items = FrequencyUnit.values(); for (FrequencyUnit item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostNameType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostNameType.java index b1b907d007b0..5f7072c7233a 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostNameType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostNameType.java @@ -26,16 +26,6 @@ public enum HostNameType { this.value = value; } - /** - * Gets the serialized value for a HostNameType instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a HostNameType instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed HostNameType object, or null if unable to parse. */ @JsonCreator - public static HostNameType fromValue(String value) { + public static HostNameType fromString(String value) { HostNameType[] items = HostNameType.values(); for (HostNameType item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostingEnvironmentStatus.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostingEnvironmentStatus.java index d48706ceb39a..e5369839310d 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostingEnvironmentStatus.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/HostingEnvironmentStatus.java @@ -32,16 +32,6 @@ public enum HostingEnvironmentStatus { this.value = value; } - /** - * Gets the serialized value for a HostingEnvironmentStatus instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a HostingEnvironmentStatus instance. * @@ -49,18 +39,19 @@ public String toValue() { * @return the parsed HostingEnvironmentStatus object, or null if unable to parse. */ @JsonCreator - public static HostingEnvironmentStatus fromValue(String value) { + public static HostingEnvironmentStatus fromString(String value) { HostingEnvironmentStatus[] items = HostingEnvironmentStatus.values(); for (HostingEnvironmentStatus item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/InternalLoadBalancingMode.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/InternalLoadBalancingMode.java index 1fc3e9d9a110..58fdd6dc6c95 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/InternalLoadBalancingMode.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/InternalLoadBalancingMode.java @@ -29,16 +29,6 @@ public enum InternalLoadBalancingMode { this.value = value; } - /** - * Gets the serialized value for a InternalLoadBalancingMode instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a InternalLoadBalancingMode instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed InternalLoadBalancingMode object, or null if unable to parse. */ @JsonCreator - public static InternalLoadBalancingMode fromValue(String value) { + public static InternalLoadBalancingMode fromString(String value) { InternalLoadBalancingMode[] items = InternalLoadBalancingMode.values(); for (InternalLoadBalancingMode item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/KeyVaultSecretStatus.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/KeyVaultSecretStatus.java index 2a4df49ca0d5..e13c011b7f4d 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/KeyVaultSecretStatus.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/KeyVaultSecretStatus.java @@ -50,16 +50,6 @@ public enum KeyVaultSecretStatus { this.value = value; } - /** - * Gets the serialized value for a KeyVaultSecretStatus instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a KeyVaultSecretStatus instance. * @@ -67,18 +57,19 @@ public String toValue() { * @return the parsed KeyVaultSecretStatus object, or null if unable to parse. */ @JsonCreator - public static KeyVaultSecretStatus fromValue(String value) { + public static KeyVaultSecretStatus fromString(String value) { KeyVaultSecretStatus[] items = KeyVaultSecretStatus.values(); for (KeyVaultSecretStatus item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/LogLevel.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/LogLevel.java index 74b8c4c9ce46..11b73766056e 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/LogLevel.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/LogLevel.java @@ -35,16 +35,6 @@ public enum LogLevel { this.value = value; } - /** - * Gets the serialized value for a LogLevel instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a LogLevel instance. * @@ -52,18 +42,19 @@ public String toValue() { * @return the parsed LogLevel object, or null if unable to parse. */ @JsonCreator - public static LogLevel fromValue(String value) { + public static LogLevel fromString(String value) { LogLevel[] items = LogLevel.values(); for (LogLevel item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedHostingEnvironmentStatus.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedHostingEnvironmentStatus.java index 8e9276fb24e9..c40c952e51ad 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedHostingEnvironmentStatus.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedHostingEnvironmentStatus.java @@ -29,16 +29,6 @@ public enum ManagedHostingEnvironmentStatus { this.value = value; } - /** - * Gets the serialized value for a ManagedHostingEnvironmentStatus instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a ManagedHostingEnvironmentStatus instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed ManagedHostingEnvironmentStatus object, or null if unable to parse. */ @JsonCreator - public static ManagedHostingEnvironmentStatus fromValue(String value) { + public static ManagedHostingEnvironmentStatus fromString(String value) { ManagedHostingEnvironmentStatus[] items = ManagedHostingEnvironmentStatus.values(); for (ManagedHostingEnvironmentStatus item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedPipelineMode.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedPipelineMode.java index 0d2176a6c27c..0a3fa9067de9 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedPipelineMode.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ManagedPipelineMode.java @@ -26,16 +26,6 @@ public enum ManagedPipelineMode { this.value = value; } - /** - * Gets the serialized value for a ManagedPipelineMode instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a ManagedPipelineMode instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed ManagedPipelineMode object, or null if unable to parse. */ @JsonCreator - public static ManagedPipelineMode fromValue(String value) { + public static ManagedPipelineMode fromString(String value) { ManagedPipelineMode[] items = ManagedPipelineMode.values(); for (ManagedPipelineMode item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/NotificationLevel.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/NotificationLevel.java index 7170b5fda983..c08bc6afaa6f 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/NotificationLevel.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/NotificationLevel.java @@ -32,16 +32,6 @@ public enum NotificationLevel { this.value = value; } - /** - * Gets the serialized value for a NotificationLevel instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a NotificationLevel instance. * @@ -49,18 +39,19 @@ public String toValue() { * @return the parsed NotificationLevel object, or null if unable to parse. */ @JsonCreator - public static NotificationLevel fromValue(String value) { + public static NotificationLevel fromString(String value) { NotificationLevel[] items = NotificationLevel.values(); for (NotificationLevel item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ProvisioningState.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ProvisioningState.java index 407adb0c3e58..7834fcc0359e 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ProvisioningState.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/ProvisioningState.java @@ -35,16 +35,6 @@ public enum ProvisioningState { this.value = value; } - /** - * Gets the serialized value for a ProvisioningState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a ProvisioningState instance. * @@ -52,18 +42,19 @@ public String toValue() { * @return the parsed ProvisioningState object, or null if unable to parse. */ @JsonCreator - public static ProvisioningState fromValue(String value) { + public static ProvisioningState fromString(String value) { ProvisioningState[] items = ProvisioningState.values(); for (ProvisioningState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SiteAvailabilityState.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SiteAvailabilityState.java index 1068547e9a99..954871641817 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SiteAvailabilityState.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SiteAvailabilityState.java @@ -29,16 +29,6 @@ public enum SiteAvailabilityState { this.value = value; } - /** - * Gets the serialized value for a SiteAvailabilityState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a SiteAvailabilityState instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed SiteAvailabilityState object, or null if unable to parse. */ @JsonCreator - public static SiteAvailabilityState fromValue(String value) { + public static SiteAvailabilityState fromString(String value) { SiteAvailabilityState[] items = SiteAvailabilityState.values(); for (SiteAvailabilityState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SiteLoadBalancing.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SiteLoadBalancing.java index 43c7b1be6e6d..91544e9dea4e 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SiteLoadBalancing.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SiteLoadBalancing.java @@ -35,16 +35,6 @@ public enum SiteLoadBalancing { this.value = value; } - /** - * Gets the serialized value for a SiteLoadBalancing instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a SiteLoadBalancing instance. * @@ -52,18 +42,19 @@ public String toValue() { * @return the parsed SiteLoadBalancing object, or null if unable to parse. */ @JsonCreator - public static SiteLoadBalancing fromValue(String value) { + public static SiteLoadBalancing fromString(String value) { SiteLoadBalancing[] items = SiteLoadBalancing.values(); for (SiteLoadBalancing item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SslState.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SslState.java index 1c80fa543f61..1f554994999d 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SslState.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/SslState.java @@ -29,16 +29,6 @@ public enum SslState { this.value = value; } - /** - * Gets the serialized value for a SslState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a SslState instance. * @@ -46,18 +36,19 @@ public String toValue() { * @return the parsed SslState object, or null if unable to parse. */ @JsonCreator - public static SslState fromValue(String value) { + public static SslState fromString(String value) { SslState[] items = SslState.values(); for (SslState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/StatusOptions.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/StatusOptions.java index 94423b5d4dc2..9e24643dee4e 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/StatusOptions.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/StatusOptions.java @@ -26,16 +26,6 @@ public enum StatusOptions { this.value = value; } - /** - * Gets the serialized value for a StatusOptions instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a StatusOptions instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed StatusOptions object, or null if unable to parse. */ @JsonCreator - public static StatusOptions fromValue(String value) { + public static StatusOptions fromString(String value) { StatusOptions[] items = StatusOptions.values(); for (StatusOptions item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UnauthenticatedClientAction.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UnauthenticatedClientAction.java index 27b6e6d39040..675a650a43de 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UnauthenticatedClientAction.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UnauthenticatedClientAction.java @@ -26,16 +26,6 @@ public enum UnauthenticatedClientAction { this.value = value; } - /** - * Gets the serialized value for a UnauthenticatedClientAction instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a UnauthenticatedClientAction instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed UnauthenticatedClientAction object, or null if unable to parse. */ @JsonCreator - public static UnauthenticatedClientAction fromValue(String value) { + public static UnauthenticatedClientAction fromString(String value) { UnauthenticatedClientAction[] items = UnauthenticatedClientAction.values(); for (UnauthenticatedClientAction item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UsageState.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UsageState.java index 790fc3332bb7..28f7ac45b3f6 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UsageState.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/UsageState.java @@ -26,16 +26,6 @@ public enum UsageState { this.value = value; } - /** - * Gets the serialized value for a UsageState instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a UsageState instance. * @@ -43,18 +33,19 @@ public String toValue() { * @return the parsed UsageState object, or null if unable to parse. */ @JsonCreator - public static UsageState fromValue(String value) { + public static UsageState fromString(String value) { UsageState[] items = UsageState.values(); for (UsageState item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/WorkerSizeOptions.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/WorkerSizeOptions.java index 85408395d78c..c2d6d0cac3bf 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/WorkerSizeOptions.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/api/WorkerSizeOptions.java @@ -32,16 +32,6 @@ public enum WorkerSizeOptions { this.value = value; } - /** - * Gets the serialized value for a WorkerSizeOptions instance. - * - * @return the serialized value. - */ - @JsonValue - public String toValue() { - return this.value; - } - /** * Parses a serialized value to a WorkerSizeOptions instance. * @@ -49,18 +39,19 @@ public String toValue() { * @return the parsed WorkerSizeOptions object, or null if unable to parse. */ @JsonCreator - public static WorkerSizeOptions fromValue(String value) { + public static WorkerSizeOptions fromString(String value) { WorkerSizeOptions[] items = WorkerSizeOptions.values(); for (WorkerSizeOptions item : items) { - if (item.toValue().equalsIgnoreCase(value)) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } + @JsonValue @Override public String toString() { - return toValue(); + return this.value; } }