diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/CHANGELOG.md b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/CHANGELOG.md
index 064cb4bbc7220..2194576276361 100644
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/CHANGELOG.md
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.3 (Unreleased)
+## 1.0.0-beta.1 (2021-06-10)
+- 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-preview-2021-06. 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.2 (2021-05-24)
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/README.md b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/README.md
index dbe551b0ba4d3..e72d02ec05daa 100644
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/README.md
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/README.md
@@ -2,7 +2,7 @@
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-preview-2021-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for ResourceGraph Management SDK. Azure Resource Graph API Reference. Package tag package-preview-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanagerazure-resourcemanager-resourcegraph
- 1.0.0-beta.2
+ 1.0.0-beta.3
```
[//]: # ({x-version-update-end})
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/pom.xml b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/pom.xml
index 0963d1e34c591..ee54a6cbce1a0 100644
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/pom.xml
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/pom.xml
@@ -13,7 +13,7 @@
jarMicrosoft Azure SDK for ResourceGraph Management
- This package contains Microsoft Azure SDK for ResourceGraph Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Resource Graph API Reference. Package tag package-preview-2021-03.
+ This package contains Microsoft Azure SDK for ResourceGraph Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Resource Graph API Reference. Package tag package-preview-2021-06.https://github.com/Azure/azure-sdk-for-java
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 a201b9e742966..f602f094772c1 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
@@ -161,7 +161,7 @@ public ResourceGraphManager authenticate(TokenCredential credential, AzureProfil
.append("-")
.append("com.azure.resourcemanager.resourcegraph")
.append("/")
- .append("1.0.0-beta.2");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/ResourceGraphClient.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/ResourceGraphClient.java
index e2cc897677fd6..16412a3b58835 100644
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/ResourceGraphClient.java
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/ResourceGraphClient.java
@@ -16,6 +16,13 @@ public interface ResourceGraphClient {
*/
String getEndpoint();
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
/**
* Gets The HTTP pipeline to send requests through.
*
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 186cff92a7f3b..0437f5d5102d0 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
@@ -9,68 +9,11 @@
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.resourcegraph.fluent.models.QueryResponseInner;
-import com.azure.resourcemanager.resourcegraph.fluent.models.ResourceChangeDataInner;
-import com.azure.resourcemanager.resourcegraph.fluent.models.ResourceChangeListInner;
import com.azure.resourcemanager.resourcegraph.models.QueryRequest;
-import com.azure.resourcemanager.resourcegraph.models.ResourceChangeDetailsRequestParameters;
-import com.azure.resourcemanager.resourcegraph.models.ResourceChangesRequestParameters;
import com.azure.resourcemanager.resourcegraph.models.ResourcesHistoryRequest;
-import java.util.List;
/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */
public interface ResourceProvidersClient {
- /**
- * List changes to a resource for a given time interval.
- *
- * @param parameters the parameters for this request for changes.
- * @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 a list of changes associated with a resource over a specific time interval.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- ResourceChangeListInner resourceChanges(ResourceChangesRequestParameters parameters);
-
- /**
- * List changes to a resource for a given time interval.
- *
- * @param parameters the parameters for this request for changes.
- * @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 a list of changes associated with a resource over a specific time interval.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response resourceChangesWithResponse(
- ResourceChangesRequestParameters parameters, Context context);
-
- /**
- * Get resource change details.
- *
- * @param parameters The parameters for this request for resource change details.
- * @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 resource change details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- List resourceChangeDetails(ResourceChangeDetailsRequestParameters parameters);
-
- /**
- * Get resource change details.
- *
- * @param parameters The parameters for this request for resource change details.
- * @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 resource change details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response> resourceChangeDetailsWithResponse(
- ResourceChangeDetailsRequestParameters parameters, Context context);
-
/**
* Queries the resources managed by Azure Resource Manager for scopes specified in the request.
*
@@ -99,7 +42,7 @@ Response> resourceChangeDetailsWithResponse(
/**
* List all snapshots of a resource for a given time interval.
*
- * @param request The request parameter.
+ * @param request Request specifying the query and its options.
* @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.
@@ -111,7 +54,7 @@ Response> resourceChangeDetailsWithResponse(
/**
* List all snapshots of a resource for a given time interval.
*
- * @param request The request parameter.
+ * @param request Request specifying the 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.
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/models/ResourceChangeDataInner.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/models/ResourceChangeDataInner.java
deleted file mode 100644
index ccc5ea5747944..0000000000000
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/models/ResourceChangeDataInner.java
+++ /dev/null
@@ -1,213 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcegraph.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.resourcegraph.models.ChangeType;
-import com.azure.resourcemanager.resourcegraph.models.ResourceChangeDataAfterSnapshot;
-import com.azure.resourcemanager.resourcegraph.models.ResourceChangeDataBeforeSnapshot;
-import com.azure.resourcemanager.resourcegraph.models.ResourcePropertyChange;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/** Data on a specific change, represented by a pair of before and after resource snapshots. */
-@Fluent
-public final class ResourceChangeDataInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceChangeDataInner.class);
-
- /*
- * The resource for a change.
- */
- @JsonProperty(value = "resourceId")
- private String resourceId;
-
- /*
- * The change ID. Valid and unique within the specified resource only.
- */
- @JsonProperty(value = "changeId", required = true)
- private String changeId;
-
- /*
- * The snapshot before the change.
- */
- @JsonProperty(value = "beforeSnapshot", required = true)
- private ResourceChangeDataBeforeSnapshot beforeSnapshot;
-
- /*
- * The snapshot after the change.
- */
- @JsonProperty(value = "afterSnapshot", required = true)
- private ResourceChangeDataAfterSnapshot afterSnapshot;
-
- /*
- * The change type for snapshot. PropertyChanges will be provided in case
- * of Update change type
- */
- @JsonProperty(value = "changeType")
- private ChangeType changeType;
-
- /*
- * An array of resource property change
- */
- @JsonProperty(value = "propertyChanges")
- private List propertyChanges;
-
- /**
- * Get the resourceId property: The resource for a change.
- *
- * @return the resourceId value.
- */
- public String resourceId() {
- return this.resourceId;
- }
-
- /**
- * Set the resourceId property: The resource for a change.
- *
- * @param resourceId the resourceId value to set.
- * @return the ResourceChangeDataInner object itself.
- */
- public ResourceChangeDataInner withResourceId(String resourceId) {
- this.resourceId = resourceId;
- return this;
- }
-
- /**
- * Get the changeId property: The change ID. Valid and unique within the specified resource only.
- *
- * @return the changeId value.
- */
- public String changeId() {
- return this.changeId;
- }
-
- /**
- * Set the changeId property: The change ID. Valid and unique within the specified resource only.
- *
- * @param changeId the changeId value to set.
- * @return the ResourceChangeDataInner object itself.
- */
- public ResourceChangeDataInner withChangeId(String changeId) {
- this.changeId = changeId;
- return this;
- }
-
- /**
- * Get the beforeSnapshot property: The snapshot before the change.
- *
- * @return the beforeSnapshot value.
- */
- public ResourceChangeDataBeforeSnapshot beforeSnapshot() {
- return this.beforeSnapshot;
- }
-
- /**
- * Set the beforeSnapshot property: The snapshot before the change.
- *
- * @param beforeSnapshot the beforeSnapshot value to set.
- * @return the ResourceChangeDataInner object itself.
- */
- public ResourceChangeDataInner withBeforeSnapshot(ResourceChangeDataBeforeSnapshot beforeSnapshot) {
- this.beforeSnapshot = beforeSnapshot;
- return this;
- }
-
- /**
- * Get the afterSnapshot property: The snapshot after the change.
- *
- * @return the afterSnapshot value.
- */
- public ResourceChangeDataAfterSnapshot afterSnapshot() {
- return this.afterSnapshot;
- }
-
- /**
- * Set the afterSnapshot property: The snapshot after the change.
- *
- * @param afterSnapshot the afterSnapshot value to set.
- * @return the ResourceChangeDataInner object itself.
- */
- public ResourceChangeDataInner withAfterSnapshot(ResourceChangeDataAfterSnapshot afterSnapshot) {
- this.afterSnapshot = afterSnapshot;
- return this;
- }
-
- /**
- * Get the changeType property: The change type for snapshot. PropertyChanges will be provided in case of Update
- * change type.
- *
- * @return the changeType value.
- */
- public ChangeType changeType() {
- return this.changeType;
- }
-
- /**
- * Set the changeType property: The change type for snapshot. PropertyChanges will be provided in case of Update
- * change type.
- *
- * @param changeType the changeType value to set.
- * @return the ResourceChangeDataInner object itself.
- */
- public ResourceChangeDataInner withChangeType(ChangeType changeType) {
- this.changeType = changeType;
- return this;
- }
-
- /**
- * Get the propertyChanges property: An array of resource property change.
- *
- * @return the propertyChanges value.
- */
- public List propertyChanges() {
- return this.propertyChanges;
- }
-
- /**
- * Set the propertyChanges property: An array of resource property change.
- *
- * @param propertyChanges the propertyChanges value to set.
- * @return the ResourceChangeDataInner object itself.
- */
- public ResourceChangeDataInner withPropertyChanges(List propertyChanges) {
- this.propertyChanges = propertyChanges;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (changeId() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- "Missing required property changeId in model ResourceChangeDataInner"));
- }
- if (beforeSnapshot() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- "Missing required property beforeSnapshot in model ResourceChangeDataInner"));
- } else {
- beforeSnapshot().validate();
- }
- if (afterSnapshot() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- "Missing required property afterSnapshot in model ResourceChangeDataInner"));
- } else {
- afterSnapshot().validate();
- }
- if (propertyChanges() != null) {
- propertyChanges().forEach(e -> e.validate());
- }
- }
-}
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/models/ResourceChangeListInner.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/models/ResourceChangeListInner.java
deleted file mode 100644
index 51a35d029c484..0000000000000
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/fluent/models/ResourceChangeListInner.java
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcegraph.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/** A list of changes associated with a resource over a specific time interval. */
-@Fluent
-public final class ResourceChangeListInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceChangeListInner.class);
-
- /*
- * The pageable value returned by the operation, i.e. a list of changes to
- * the resource.
- *
- * - The list is ordered from the most recent changes to the least recent
- * changes.
- * - This list will be empty if there were no changes during the requested
- * interval.
- * - The `Before` snapshot timestamp value of the oldest change can be
- * outside of the specified time interval.
- */
- @JsonProperty(value = "changes")
- private List changes;
-
- /*
- * Skip token that encodes the skip information while executing the current
- * request
- */
- @JsonProperty(value = "$skipToken")
- private Object skipToken;
-
- /**
- * Get the changes property: The pageable value returned by the operation, i.e. a list of changes to the resource.
- *
- *
- The list is ordered from the most recent changes to the least recent changes. - This list will be empty if
- * there were no changes during the requested interval. - The `Before` snapshot timestamp value of the oldest change
- * can be outside of the specified time interval.
- *
- * @return the changes value.
- */
- public List changes() {
- return this.changes;
- }
-
- /**
- * Set the changes property: The pageable value returned by the operation, i.e. a list of changes to the resource.
- *
- *
- The list is ordered from the most recent changes to the least recent changes. - This list will be empty if
- * there were no changes during the requested interval. - The `Before` snapshot timestamp value of the oldest change
- * can be outside of the specified time interval.
- *
- * @param changes the changes value to set.
- * @return the ResourceChangeListInner object itself.
- */
- public ResourceChangeListInner withChanges(List changes) {
- this.changes = changes;
- return this;
- }
-
- /**
- * Get the skipToken property: Skip token that encodes the skip information while executing the current request.
- *
- * @return the skipToken value.
- */
- public Object skipToken() {
- return this.skipToken;
- }
-
- /**
- * Set the skipToken property: Skip token that encodes the skip information while executing the current request.
- *
- * @param skipToken the skipToken value to set.
- * @return the ResourceChangeListInner object itself.
- */
- public ResourceChangeListInner withSkipToken(Object skipToken) {
- this.skipToken = skipToken;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (changes() != null) {
- changes().forEach(e -> e.validate());
- }
- }
-}
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/OperationsClientImpl.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/OperationsClientImpl.java
index 12c12f2070fe9..4a540c9962a1e 100644
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/OperationsClientImpl.java
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/OperationsClientImpl.java
@@ -84,10 +84,10 @@ private Mono> listSinglePageAsync() {
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
- final String apiVersion = "2021-03-01";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context))
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
.>map(
res ->
new PagedResponseBase<>(
@@ -112,11 +112,10 @@ private Mono> listSinglePageAsync(Context context)
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
- final String apiVersion = "2021-03-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .list(this.client.getEndpoint(), apiVersion, accept, context)
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
.map(
res ->
new PagedResponseBase<>(
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceChangeDataImpl.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceChangeDataImpl.java
deleted file mode 100644
index 56cd4365f0f32..0000000000000
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceChangeDataImpl.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcegraph.implementation;
-
-import com.azure.resourcemanager.resourcegraph.fluent.models.ResourceChangeDataInner;
-import com.azure.resourcemanager.resourcegraph.models.ChangeType;
-import com.azure.resourcemanager.resourcegraph.models.ResourceChangeData;
-import com.azure.resourcemanager.resourcegraph.models.ResourceChangeDataAfterSnapshot;
-import com.azure.resourcemanager.resourcegraph.models.ResourceChangeDataBeforeSnapshot;
-import com.azure.resourcemanager.resourcegraph.models.ResourcePropertyChange;
-import java.util.Collections;
-import java.util.List;
-
-public final class ResourceChangeDataImpl implements ResourceChangeData {
- private ResourceChangeDataInner innerObject;
-
- private final com.azure.resourcemanager.resourcegraph.ResourceGraphManager serviceManager;
-
- ResourceChangeDataImpl(
- ResourceChangeDataInner innerObject,
- com.azure.resourcemanager.resourcegraph.ResourceGraphManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
- public String resourceId() {
- return this.innerModel().resourceId();
- }
-
- public String changeId() {
- return this.innerModel().changeId();
- }
-
- public ResourceChangeDataBeforeSnapshot beforeSnapshot() {
- return this.innerModel().beforeSnapshot();
- }
-
- public ResourceChangeDataAfterSnapshot afterSnapshot() {
- return this.innerModel().afterSnapshot();
- }
-
- public ChangeType changeType() {
- return this.innerModel().changeType();
- }
-
- public List propertyChanges() {
- List inner = this.innerModel().propertyChanges();
- if (inner != null) {
- return Collections.unmodifiableList(inner);
- } else {
- return Collections.emptyList();
- }
- }
-
- public ResourceChangeDataInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceChangeListImpl.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceChangeListImpl.java
deleted file mode 100644
index e0e7c8dca71ae..0000000000000
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceChangeListImpl.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcegraph.implementation;
-
-import com.azure.resourcemanager.resourcegraph.fluent.models.ResourceChangeDataInner;
-import com.azure.resourcemanager.resourcegraph.fluent.models.ResourceChangeListInner;
-import com.azure.resourcemanager.resourcegraph.models.ResourceChangeData;
-import com.azure.resourcemanager.resourcegraph.models.ResourceChangeList;
-import java.util.Collections;
-import java.util.List;
-import java.util.stream.Collectors;
-
-public final class ResourceChangeListImpl implements ResourceChangeList {
- private ResourceChangeListInner innerObject;
-
- private final com.azure.resourcemanager.resourcegraph.ResourceGraphManager serviceManager;
-
- ResourceChangeListImpl(
- ResourceChangeListInner innerObject,
- com.azure.resourcemanager.resourcegraph.ResourceGraphManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
- public List changes() {
- List inner = this.innerModel().changes();
- if (inner != null) {
- return Collections
- .unmodifiableList(
- inner
- .stream()
- .map(inner1 -> new ResourceChangeDataImpl(inner1, this.manager()))
- .collect(Collectors.toList()));
- } else {
- return Collections.emptyList();
- }
- }
-
- public Object skipToken() {
- return this.innerModel().skipToken();
- }
-
- public ResourceChangeListInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager() {
- return this.serviceManager;
- }
-}
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 607a0acd0bbba..cd0fe0f434475 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
@@ -51,6 +51,18 @@ public String getEndpoint() {
return this.endpoint;
}
+ /** Api Version. */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
/** The HTTP pipeline to send requests through. */
private final HttpPipeline httpPipeline;
@@ -130,6 +142,7 @@ public OperationsClient getOperations() {
this.serializerAdapter = serializerAdapter;
this.defaultPollInterval = defaultPollInterval;
this.endpoint = endpoint;
+ this.apiVersion = "2021-06-01-preview";
this.resourceProviders = new ResourceProvidersClientImpl(this);
this.operations = new OperationsClientImpl(this);
}
diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceProvidersClientImpl.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceProvidersClientImpl.java
index 5c82e03a81faf..4908b5536647a 100644
--- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceProvidersClientImpl.java
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceProvidersClientImpl.java
@@ -24,13 +24,8 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.resourcegraph.fluent.ResourceProvidersClient;
import com.azure.resourcemanager.resourcegraph.fluent.models.QueryResponseInner;
-import com.azure.resourcemanager.resourcegraph.fluent.models.ResourceChangeDataInner;
-import com.azure.resourcemanager.resourcegraph.fluent.models.ResourceChangeListInner;
import com.azure.resourcemanager.resourcegraph.models.QueryRequest;
-import com.azure.resourcemanager.resourcegraph.models.ResourceChangeDetailsRequestParameters;
-import com.azure.resourcemanager.resourcegraph.models.ResourceChangesRequestParameters;
import com.azure.resourcemanager.resourcegraph.models.ResourcesHistoryRequest;
-import java.util.List;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */
@@ -61,28 +56,6 @@ public final class ResourceProvidersClientImpl implements ResourceProvidersClien
@Host("{$host}")
@ServiceInterface(name = "ResourceGraphClientR")
private interface ResourceProvidersService {
- @Headers({"Content-Type: application/json"})
- @Post("/providers/Microsoft.ResourceGraph/resourceChanges")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> resourceChanges(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") ResourceChangesRequestParameters parameters,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Post("/providers/Microsoft.ResourceGraph/resourceChangeDetails")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> resourceChangeDetails(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") ResourceChangeDetailsRequestParameters parameters,
- @HeaderParam("Accept") String accept,
- Context context);
-
@Headers({"Content-Type: application/json"})
@Post("/providers/Microsoft.ResourceGraph/resources")
@ExpectedResponses({200})
@@ -106,234 +79,6 @@ Mono> resourcesHistory(
Context context);
}
- /**
- * List changes to a resource for a given time interval.
- *
- * @param parameters the parameters for this request for changes.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of changes associated with a resource over a specific time interval.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> resourceChangesWithResponseAsync(
- ResourceChangesRequestParameters parameters) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
- final String apiVersion = "2020-09-01-preview";
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.resourceChanges(this.client.getEndpoint(), apiVersion, parameters, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * List changes to a resource for a given time interval.
- *
- * @param parameters the parameters for this request for changes.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of changes associated with a resource over a specific time interval.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> resourceChangesWithResponseAsync(
- ResourceChangesRequestParameters parameters, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
- final String apiVersion = "2020-09-01-preview";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.resourceChanges(this.client.getEndpoint(), apiVersion, parameters, accept, context);
- }
-
- /**
- * List changes to a resource for a given time interval.
- *
- * @param parameters the parameters for this request for changes.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of changes associated with a resource over a specific time interval.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono resourceChangesAsync(ResourceChangesRequestParameters parameters) {
- return resourceChangesWithResponseAsync(parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
- }
-
- /**
- * List changes to a resource for a given time interval.
- *
- * @param parameters the parameters for this request for changes.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of changes associated with a resource over a specific time interval.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ResourceChangeListInner resourceChanges(ResourceChangesRequestParameters parameters) {
- return resourceChangesAsync(parameters).block();
- }
-
- /**
- * List changes to a resource for a given time interval.
- *
- * @param parameters the parameters for this request for changes.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of changes associated with a resource over a specific time interval.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response resourceChangesWithResponse(
- ResourceChangesRequestParameters parameters, Context context) {
- return resourceChangesWithResponseAsync(parameters, context).block();
- }
-
- /**
- * Get resource change details.
- *
- * @param parameters The parameters for this request for resource change details.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return resource change details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> resourceChangeDetailsWithResponseAsync(
- ResourceChangeDetailsRequestParameters parameters) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
- final String apiVersion = "2020-09-01-preview";
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service.resourceChangeDetails(this.client.getEndpoint(), apiVersion, parameters, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Get resource change details.
- *
- * @param parameters The parameters for this request for resource change details.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return resource change details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> resourceChangeDetailsWithResponseAsync(
- ResourceChangeDetailsRequestParameters parameters, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
- final String apiVersion = "2020-09-01-preview";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.resourceChangeDetails(this.client.getEndpoint(), apiVersion, parameters, accept, context);
- }
-
- /**
- * Get resource change details.
- *
- * @param parameters The parameters for this request for resource change details.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return resource change details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> resourceChangeDetailsAsync(
- ResourceChangeDetailsRequestParameters parameters) {
- return resourceChangeDetailsWithResponseAsync(parameters)
- .flatMap(
- (Response> res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
- }
-
- /**
- * Get resource change details.
- *
- * @param parameters The parameters for this request for resource change details.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return resource change details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public List resourceChangeDetails(ResourceChangeDetailsRequestParameters parameters) {
- return resourceChangeDetailsAsync(parameters).block();
- }
-
- /**
- * Get resource change details.
- *
- * @param parameters The parameters for this request for resource change details.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return resource change details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response> resourceChangeDetailsWithResponse(
- ResourceChangeDetailsRequestParameters parameters, Context context) {
- return resourceChangeDetailsWithResponseAsync(parameters, context).block();
- }
-
/**
* Queries the resources managed by Azure Resource Manager for scopes specified in the request.
*
@@ -356,10 +101,11 @@ private Mono> resourcesWithResponseAsync(QueryReque
} else {
query.validate();
}
- final String apiVersion = "2021-03-01";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.resources(this.client.getEndpoint(), apiVersion, query, accept, context))
+ .withContext(
+ context ->
+ service.resources(this.client.getEndpoint(), this.client.getApiVersion(), query, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -386,10 +132,9 @@ private Mono> resourcesWithResponseAsync(QueryReque
} else {
query.validate();
}
- final String apiVersion = "2021-03-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service.resources(this.client.getEndpoint(), apiVersion, query, accept, context);
+ return service.resources(this.client.getEndpoint(), this.client.getApiVersion(), query, accept, context);
}
/**
@@ -446,7 +191,7 @@ public Response resourcesWithResponse(QueryRequest query, Co
/**
* List all snapshots of a resource for a given time interval.
*
- * @param request The request parameter.
+ * @param request Request specifying the query and its options.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -465,18 +210,20 @@ private Mono> resourcesHistoryWithResponseAsync(ResourcesHistor
} else {
request.validate();
}
- final String apiVersion = "2020-04-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
- context -> service.resourcesHistory(this.client.getEndpoint(), apiVersion, request, accept, context))
+ context ->
+ service
+ .resourcesHistory(
+ this.client.getEndpoint(), this.client.getApiVersion(), request, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* List all snapshots of a resource for a given time interval.
*
- * @param request The request parameter.
+ * @param request Request specifying the query and its options.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -496,16 +243,16 @@ private Mono> resourcesHistoryWithResponseAsync(ResourcesHistor
} else {
request.validate();
}
- final String apiVersion = "2020-04-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service.resourcesHistory(this.client.getEndpoint(), apiVersion, request, accept, context);
+ return service
+ .resourcesHistory(this.client.getEndpoint(), this.client.getApiVersion(), request, accept, context);
}
/**
* List all snapshots of a resource for a given time interval.
*
- * @param request The request parameter.
+ * @param request Request specifying the query and its options.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -527,7 +274,7 @@ private Mono