diff --git a/sdk/resourcegraph/mgmt-v2019_04_01/pom.xml b/sdk/resourcegraph/mgmt-v2019_04_01/pom.xml
index e54f6bc154690..11c6961f27676 100644
--- a/sdk/resourcegraph/mgmt-v2019_04_01/pom.xml
+++ b/sdk/resourcegraph/mgmt-v2019_04_01/pom.xml
@@ -11,11 +11,11 @@
com.microsoft.azure
azure-arm-parent
- 1.2.0
+ 1.1.0
../../../pom.management.xml
azure-mgmt-resourcegraph
- 1.0.0-beta-1
+ 1.0.0-beta
jar
Microsoft Azure SDK for ResourceGraph Management
This package contains Microsoft ResourceGraph Management SDK.
@@ -71,6 +71,8 @@
azure-arm-client-runtime
test-jar
test
+
+ 1.6.5
diff --git a/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/Facet.java b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/Facet.java
index 3b8e7eb693b38..1260100cab34f 100644
--- a/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/Facet.java
+++ b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/Facet.java
@@ -17,7 +17,7 @@
* A facet containing additional statistics on the response of a query. Can be
* either FacetResult or FacetError.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = Facet.class)
@JsonTypeName("Facet")
@JsonSubTypes({
@JsonSubTypes.Type(name = "FacetResult", value = FacetResult.class),
diff --git a/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/FacetError.java b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/FacetError.java
index e385a090aabfc..9a880a4826a06 100644
--- a/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/FacetError.java
+++ b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/FacetError.java
@@ -16,7 +16,7 @@
/**
* A facet whose execution resulted in an error.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = FacetError.class)
@JsonTypeName("FacetError")
public class FacetError extends Facet {
/**
diff --git a/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/FacetResult.java b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/FacetResult.java
index ade22fb1e4e55..63915a5288933 100644
--- a/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/FacetResult.java
+++ b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/FacetResult.java
@@ -16,7 +16,7 @@
* Successfully executed facet containing additional statistics on the response
* of a query.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = FacetResult.class)
@JsonTypeName("FacetResult")
public class FacetResult extends Facet {
/**
diff --git a/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/QueryResponse.java b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/QueryResponse.java
new file mode 100644
index 0000000000000..fb3dae8ba93e3
--- /dev/null
+++ b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/QueryResponse.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.resourcegraph.v2019_04_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.resourcegraph.v2019_04_01.implementation.ResourceGraphManager;
+import com.microsoft.azure.management.resourcegraph.v2019_04_01.implementation.QueryResponseInner;
+import java.util.List;
+
+/**
+ * Type representing QueryResponse.
+ */
+public interface QueryResponse extends HasInner, HasManager {
+ /**
+ * @return the count value.
+ */
+ long count();
+
+ /**
+ * @return the data value.
+ */
+ Object data();
+
+ /**
+ * @return the facets value.
+ */
+ List facets();
+
+ /**
+ * @return the resultTruncated value.
+ */
+ ResultTruncated resultTruncated();
+
+ /**
+ * @return the skipToken value.
+ */
+ String skipToken();
+
+ /**
+ * @return the totalRecords value.
+ */
+ long totalRecords();
+
+}
diff --git a/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/Querys.java b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/Querys.java
new file mode 100644
index 0000000000000..44adf68ec0bfb
--- /dev/null
+++ b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/Querys.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.resourcegraph.v2019_04_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.resourcegraph.v2019_04_01.implementation.QuerysInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Querys.
+ */
+public interface Querys extends HasInner {
+ /**
+ * Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
+ *
+ * @param query Request specifying query and its options.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable resourcesAsync(QueryRequest query);
+
+}
diff --git a/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/QueryResponseImpl.java b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/QueryResponseImpl.java
new file mode 100644
index 0000000000000..8e5a2c6850b37
--- /dev/null
+++ b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/QueryResponseImpl.java
@@ -0,0 +1,59 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.resourcegraph.v2019_04_01.implementation;
+
+import com.microsoft.azure.management.resourcegraph.v2019_04_01.QueryResponse;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import java.util.List;
+import com.microsoft.azure.management.resourcegraph.v2019_04_01.Facet;
+import com.microsoft.azure.management.resourcegraph.v2019_04_01.ResultTruncated;
+
+class QueryResponseImpl extends WrapperImpl implements QueryResponse {
+ private final ResourceGraphManager manager;
+ QueryResponseImpl(QueryResponseInner inner, ResourceGraphManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public ResourceGraphManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public long count() {
+ return this.inner().count();
+ }
+
+ @Override
+ public Object data() {
+ return this.inner().data();
+ }
+
+ @Override
+ public List facets() {
+ return this.inner().facets();
+ }
+
+ @Override
+ public ResultTruncated resultTruncated() {
+ return this.inner().resultTruncated();
+ }
+
+ @Override
+ public String skipToken() {
+ return this.inner().skipToken();
+ }
+
+ @Override
+ public long totalRecords() {
+ return this.inner().totalRecords();
+ }
+
+}
diff --git a/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/QuerysImpl.java b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/QuerysImpl.java
new file mode 100644
index 0000000000000..988251d5da451
--- /dev/null
+++ b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/QuerysImpl.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * abc
+ */
+
+package com.microsoft.azure.management.resourcegraph.v2019_04_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.resourcegraph.v2019_04_01.Querys;
+import rx.functions.Func1;
+import rx.Observable;
+import com.microsoft.azure.management.resourcegraph.v2019_04_01.QueryResponse;
+import com.microsoft.azure.management.resourcegraph.v2019_04_01.QueryRequest;
+
+class QuerysImpl extends WrapperImpl implements Querys {
+ private final ResourceGraphManager manager;
+
+ QuerysImpl(ResourceGraphManager manager) {
+ super(manager.inner().querys());
+ this.manager = manager;
+ }
+
+ public ResourceGraphManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable resourcesAsync(QueryRequest query) {
+ QuerysInner client = this.inner();
+ return client.resourcesAsync(query)
+ .map(new Func1() {
+ @Override
+ public QueryResponse call(QueryResponseInner inner) {
+ return new QueryResponseImpl(inner, manager());
+ }
+ });
+ }
+
+}
diff --git a/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/QuerysInner.java b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/QuerysInner.java
new file mode 100644
index 0000000000000..09008a4645d06
--- /dev/null
+++ b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/QuerysInner.java
@@ -0,0 +1,139 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.resourcegraph.v2019_04_01.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.management.resourcegraph.v2019_04_01.ErrorResponseException;
+import com.microsoft.azure.management.resourcegraph.v2019_04_01.QueryRequest;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.POST;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in Querys.
+ */
+public class QuerysInner {
+ /** The Retrofit service to perform REST calls. */
+ private QuerysService service;
+ /** The service client containing this operation class. */
+ private ResourceGraphClientImpl client;
+
+ /**
+ * Initializes an instance of QuerysInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public QuerysInner(Retrofit retrofit, ResourceGraphClientImpl client) {
+ this.service = retrofit.create(QuerysService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for Querys to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface QuerysService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resourcegraph.v2019_04_01.Querys resources" })
+ @POST("providers/Microsoft.ResourceGraph/resources")
+ Observable> resources(@Query("api-version") String apiVersion, @Body QueryRequest query, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
+ *
+ * @param query Request specifying query and its options.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the QueryResponseInner object if successful.
+ */
+ public QueryResponseInner resources(QueryRequest query) {
+ return resourcesWithServiceResponseAsync(query).toBlocking().single().body();
+ }
+
+ /**
+ * Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
+ *
+ * @param query Request specifying query and its options.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture resourcesAsync(QueryRequest query, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(resourcesWithServiceResponseAsync(query), serviceCallback);
+ }
+
+ /**
+ * Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
+ *
+ * @param query Request specifying query and its options.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the QueryResponseInner object
+ */
+ public Observable resourcesAsync(QueryRequest query) {
+ return resourcesWithServiceResponseAsync(query).map(new Func1, QueryResponseInner>() {
+ @Override
+ public QueryResponseInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
+ *
+ * @param query Request specifying query and its options.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the QueryResponseInner object
+ */
+ public Observable> resourcesWithServiceResponseAsync(QueryRequest query) {
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ if (query == null) {
+ throw new IllegalArgumentException("Parameter query is required and cannot be null.");
+ }
+ Validator.validate(query);
+ return service.resources(this.client.apiVersion(), query, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = resourcesDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse resourcesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+}
diff --git a/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/ResourceGraphClientImpl.java b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/ResourceGraphClientImpl.java
index 1762ae4d75c29..71ec866d080b5 100644
--- a/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/ResourceGraphClientImpl.java
+++ b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/ResourceGraphClientImpl.java
@@ -8,34 +8,15 @@
package com.microsoft.azure.management.resourcegraph.v2019_04_01.implementation;
-import com.google.common.reflect.TypeToken;
import com.microsoft.azure.AzureClient;
import com.microsoft.azure.AzureServiceClient;
-import com.microsoft.azure.management.resourcegraph.v2019_04_01.ErrorResponseException;
-import com.microsoft.azure.management.resourcegraph.v2019_04_01.QueryRequest;
import com.microsoft.rest.credentials.ServiceClientCredentials;
import com.microsoft.rest.RestClient;
-import com.microsoft.rest.ServiceCallback;
-import com.microsoft.rest.ServiceFuture;
-import com.microsoft.rest.ServiceResponse;
-import com.microsoft.rest.Validator;
-import java.io.IOException;
-import okhttp3.ResponseBody;
-import retrofit2.http.Body;
-import retrofit2.http.Header;
-import retrofit2.http.Headers;
-import retrofit2.http.POST;
-import retrofit2.http.Query;
-import retrofit2.Response;
-import rx.functions.Func1;
-import rx.Observable;
/**
* Initializes a new instance of the ResourceGraphClientImpl class.
*/
public class ResourceGraphClientImpl extends AzureServiceClient {
- /** The Retrofit service to perform REST calls. */
- private ResourceGraphClientService service;
/** the {@link AzureClient} used for long running operations. */
private AzureClient azureClient;
@@ -128,6 +109,19 @@ public ResourceGraphClientImpl withGenerateClientRequestId(boolean generateClien
return this;
}
+ /**
+ * The QuerysInner object to access its operations.
+ */
+ private QuerysInner querys;
+
+ /**
+ * Gets the QuerysInner object to access its operations.
+ * @return the QuerysInner object.
+ */
+ public QuerysInner querys() {
+ return this.querys;
+ }
+
/**
* The OperationsInner object to access its operations.
*/
@@ -176,9 +170,9 @@ protected void initialize() {
this.acceptLanguage = "en-US";
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
+ this.querys = new QuerysInner(restClient().retrofit(), this);
this.operations = new OperationsInner(restClient().retrofit(), this);
this.azureClient = new AzureClient(this);
- initializeService();
}
/**
@@ -190,97 +184,4 @@ protected void initialize() {
public String userAgent() {
return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "ResourceGraphClient", "2019-04-01");
}
-
- private void initializeService() {
- service = restClient().retrofit().create(ResourceGraphClientService.class);
- }
-
- /**
- * The interface defining all the services for ResourceGraphClient to be
- * used by Retrofit to perform actually REST calls.
- */
- interface ResourceGraphClientService {
- @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resourcegraph.v2019_04_01.ResourceGraphClient resources" })
- @POST("providers/Microsoft.ResourceGraph/resources")
- Observable> resources(@Query("api-version") String apiVersion, @Body QueryRequest query, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
-
- }
-
- /**
- * Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
- *
- * @param query Request specifying query and its options.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ErrorResponseException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- * @return the QueryResponseInner object if successful.
- */
- public QueryResponseInner resources(QueryRequest query) {
- return resourcesWithServiceResponseAsync(query).toBlocking().single().body();
- }
-
- /**
- * Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
- *
- * @param query Request specifying query and its options.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the {@link ServiceFuture} object
- */
- public ServiceFuture resourcesAsync(QueryRequest query, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(resourcesWithServiceResponseAsync(query), serviceCallback);
- }
-
- /**
- * Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
- *
- * @param query Request specifying query and its options.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the QueryResponseInner object
- */
- public Observable resourcesAsync(QueryRequest query) {
- return resourcesWithServiceResponseAsync(query).map(new Func1, QueryResponseInner>() {
- @Override
- public QueryResponseInner call(ServiceResponse response) {
- return response.body();
- }
- });
- }
-
- /**
- * Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
- *
- * @param query Request specifying query and its options.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the QueryResponseInner object
- */
- public Observable> resourcesWithServiceResponseAsync(QueryRequest query) {
- if (this.apiVersion() == null) {
- throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null.");
- }
- if (query == null) {
- throw new IllegalArgumentException("Parameter query is required and cannot be null.");
- }
- Validator.validate(query);
- return service.resources(this.apiVersion(), query, this.acceptLanguage(), this.userAgent())
- .flatMap(new Func1, Observable>>() {
- @Override
- public Observable> call(Response response) {
- try {
- ServiceResponse clientResponse = resourcesDelegate(response);
- return Observable.just(clientResponse);
- } catch (Throwable t) {
- return Observable.error(t);
- }
- }
- });
- }
-
- private ServiceResponse resourcesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
- return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter())
- .register(200, new TypeToken() { }.getType())
- .registerError(ErrorResponseException.class)
- .build(response);
- }
-
}
diff --git a/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/ResourceGraphManager.java b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/ResourceGraphManager.java
index d0c9161f4eb2f..1e12a02597efb 100644
--- a/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/ResourceGraphManager.java
+++ b/sdk/resourcegraph/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/resourcegraph/v2019_04_01/implementation/ResourceGraphManager.java
@@ -16,6 +16,7 @@
import com.microsoft.azure.arm.resources.AzureConfigurable;
import com.microsoft.azure.serializer.AzureJacksonAdapter;
import com.microsoft.rest.RestClient;
+import com.microsoft.azure.management.resourcegraph.v2019_04_01.Querys;
import com.microsoft.azure.management.resourcegraph.v2019_04_01.Operations;
import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl;
import com.microsoft.azure.arm.resources.implementation.ManagerCore;
@@ -24,6 +25,7 @@
* Entry point to Azure ResourceGraph resource management.
*/
public final class ResourceGraphManager extends ManagerCore {
+ private Querys querys;
private Operations operations;
/**
* Get a Configurable instance that can be used to create ResourceGraphManager with optional configuration.
@@ -69,6 +71,16 @@ public interface Configurable extends AzureConfigurable {
ResourceGraphManager authenticate(AzureTokenCredentials credentials);
}
+ /**
+ * @return Entry point to manage Querys.
+ */
+ public Querys querys() {
+ if (this.querys == null) {
+ this.querys = new QuerysImpl(this);
+ }
+ return this.querys;
+ }
+
/**
* @return Entry point to manage Operations.
*/