diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index bb7b88dfbaa1..5f047333bd26 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -274,7 +274,7 @@ com.azure.resourcemanager:azure-resourcemanager-datadog;1.0.0-beta.3;1.0.0-beta.
com.azure.resourcemanager:azure-resourcemanager-communication;1.0.0;1.1.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-apimanagement;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-kubernetesconfiguration;1.0.0-beta.3;1.0.0-beta.4
-com.azure.resourcemanager:azure-resourcemanager-resourcegraph;1.0.0-beta.3;1.0.0-beta.4
+com.azure.resourcemanager:azure-resourcemanager-resourcegraph;1.0.0-beta.3;1.0.0
com.azure.resourcemanager:azure-resourcemanager-changeanalysis;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-delegatednetwork;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-synapse;1.0.0-beta.6;1.0.0-beta.7
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/CHANGELOG.md b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/CHANGELOG.md
index 98c9dc1a4a82..68217fa2fc9a 100644
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/CHANGELOG.md
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/CHANGELOG.md
@@ -1,14 +1,8 @@
# Release History
-## 1.0.0-beta.4 (Unreleased)
+## 1.0.0 (2022-11-02)
-### Features Added
-
-### Breaking Changes
-
-### Bugs Fixed
-
-### Other Changes
+- Azure Resource Manager ResourceGraph client library for Java. This package contains Microsoft Azure SDK for ResourceGraph Management SDK. Azure Resource Graph API Reference. Package tag package-2021-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.3 (2022-04-07)
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/README.md b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/README.md
index c7e4150e722d..6006edf2b3cf 100644
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/README.md
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanagerazure-resourcemanager-resourcegraph
- 1.0.0-beta.3
+ 1.0.0
```
[//]: # ({x-version-update-end})
@@ -41,19 +41,19 @@ Various documentation is available to help you get started
Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
-[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation.
### Authentication
-By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
-In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-With above configuration, `azure` client can be authenticated by following code:
+With above configuration, `azure` client can be authenticated using the following code:
```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -97,13 +97,13 @@ response = manager.resourceProviders().resources(queryRequest);
## Contributing
-For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+For details on contributing to this repository, see the [contributing guide][cg].
-1. Fork it
-1. Create your feature branch (`git checkout -b my-new-feature`)
-1. Commit your changes (`git commit -am 'Add some feature'`)
-1. Push to the branch (`git push origin my-new-feature`)
-1. Create new Pull Request
+This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit .
+
+When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
+
+This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments.
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
@@ -114,3 +114,6 @@ For details on contributing to this repository, see the [contributing guide](htt
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
+[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
+[coc]: https://opensource.microsoft.com/codeofconduct/
+[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/pom.xml b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/pom.xml
index 62da0247ae9e..9c8aeb50075a 100644
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/pom.xml
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/pom.xml
@@ -9,7 +9,7 @@
com.azure.resourcemanagerazure-resourcemanager-resourcegraph
- 1.0.0-beta.4
+ 1.0.0jarMicrosoft Azure SDK for ResourceGraph Management
@@ -51,6 +51,12 @@
azure-core-management1.8.1
+
+ com.azure
+ azure-core-test
+ 1.12.1
+ test
+ com.azureazure-identity
@@ -58,9 +64,15 @@
test
- com.azure
- azure-core-test
- 1.12.1
+ org.junit.jupiter
+ junit-jupiter-engine
+ 5.8.2
+ test
+
+
+ org.mockito
+ mockito-core
+ 4.5.1test
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/ResourceGraphManager.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/ResourceGraphManager.java
index dbc13510472b..77221a00072b 100644
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/ResourceGraphManager.java
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/ResourceGraphManager.java
@@ -206,7 +206,7 @@ public ResourceGraphManager authenticate(TokenCredential credential, AzureProfil
.append("-")
.append("com.azure.resourcemanager.resourcegraph")
.append("/")
- .append("1.0.0-beta.3");
+ .append("1.0.0");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -263,7 +263,11 @@ public ResourceGraphManager authenticate(TokenCredential credential, AzureProfil
}
}
- /** @return Resource collection API of ResourceProviders. */
+ /**
+ * Gets the resource collection API of ResourceProviders.
+ *
+ * @return Resource collection API of ResourceProviders.
+ */
public ResourceProviders resourceProviders() {
if (this.resourceProviders == null) {
this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this);
@@ -271,7 +275,11 @@ public ResourceProviders resourceProviders() {
return resourceProviders;
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/ResourceProvidersClient.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/ResourceProvidersClient.java
index e78b538a4bfc..0c06911802d0 100644
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/ResourceProvidersClient.java
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/ResourceProvidersClient.java
@@ -17,24 +17,24 @@ public interface ResourceProvidersClient {
* Queries the resources managed by Azure Resource Manager for scopes specified in the request.
*
* @param query Request specifying query and its options.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return query result.
+ * @return query result along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- QueryResponseInner resources(QueryRequest query);
+ Response resourcesWithResponse(QueryRequest query, Context context);
/**
* Queries the resources managed by Azure Resource Manager for scopes specified in the request.
*
* @param query Request specifying query and its options.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return query result along with {@link Response}.
+ * @return query result.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response resourcesWithResponse(QueryRequest query, Context context);
+ QueryResponseInner resources(QueryRequest query);
}
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/models/OperationInner.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/models/OperationInner.java
index 3807d8330214..283fbd362e7e 100644
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/models/OperationInner.java
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/models/OperationInner.java
@@ -29,6 +29,10 @@ public final class OperationInner {
@JsonProperty(value = "origin")
private String origin;
+ /** Creates an instance of OperationInner class. */
+ public OperationInner() {
+ }
+
/**
* Get the name property: Operation name: {provider}/{resource}/{operation}.
*
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/models/QueryResponseInner.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/models/QueryResponseInner.java
index 499340d6c1f3..9d693eed3168 100644
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/models/QueryResponseInner.java
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/models/QueryResponseInner.java
@@ -21,8 +21,8 @@ public final class QueryResponseInner {
private long totalRecords;
/*
- * Number of records returned in the current response. In the case of
- * paging, this is the number of records in the current page.
+ * Number of records returned in the current response. In the case of paging, this is the number of records in the
+ * current page.
*/
@JsonProperty(value = "count", required = true)
private long count;
@@ -34,9 +34,8 @@ public final class QueryResponseInner {
private ResultTruncated resultTruncated;
/*
- * When present, the value can be passed to a subsequent query call
- * (together with the same query and scopes used in the current request) to
- * retrieve the next page of data.
+ * When present, the value can be passed to a subsequent query call (together with the same query and scopes used
+ * in the current request) to retrieve the next page of data.
*/
@JsonProperty(value = "$skipToken")
private String skipToken;
@@ -53,6 +52,10 @@ public final class QueryResponseInner {
@JsonProperty(value = "facets")
private List facets;
+ /** Creates an instance of QueryResponseInner class. */
+ public QueryResponseInner() {
+ }
+
/**
* Get the totalRecords property: Number of total records matching the query.
*
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceGraphClientBuilder.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceGraphClientBuilder.java
index 8712af38576c..5620f7fc0065 100644
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceGraphClientBuilder.java
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceGraphClientBuilder.java
@@ -103,26 +103,21 @@ public ResourceGraphClientBuilder serializerAdapter(SerializerAdapter serializer
* @return an instance of ResourceGraphClientImpl.
*/
public ResourceGraphClientImpl buildClient() {
- if (pipeline == null) {
- this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
- }
- if (endpoint == null) {
- this.endpoint = "https://management.azure.com";
- }
- if (environment == null) {
- this.environment = AzureEnvironment.AZURE;
- }
- if (pipeline == null) {
- this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
- }
- if (defaultPollInterval == null) {
- this.defaultPollInterval = Duration.ofSeconds(30);
- }
- if (serializerAdapter == null) {
- this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
- }
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline =
+ (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval =
+ (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter =
+ (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
ResourceGraphClientImpl client =
- new ResourceGraphClientImpl(pipeline, serializerAdapter, defaultPollInterval, environment, endpoint);
+ new ResourceGraphClientImpl(
+ localPipeline, localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint);
return client;
}
}
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceGraphClientImpl.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceGraphClientImpl.java
index 334dc3c6d7a4..1a59844481ff 100644
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceGraphClientImpl.java
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceGraphClientImpl.java
@@ -15,6 +15,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
@@ -30,7 +31,6 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -161,10 +161,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry