changes;
+
+ /*
+ * Skip token that encodes the skip information while executing the current request
+ */
+ @JsonProperty(value = "$skipToken")
+ private Object skipToken;
+
+ /** Creates an instance of ResourceChangeListInner class. */
+ public ResourceChangeListInner() {
+ }
+
+ /**
+ * 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 92e4e6c050be..1d0169fd672f 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
@@ -82,10 +82,10 @@ private Mono> listSinglePageAsync() {
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
+ final String apiVersion = "2022-10-01";
final String accept = "application/json";
return FluxUtil
- .withContext(
- context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context))
.>map(
res ->
new PagedResponseBase<>(
@@ -111,10 +111,11 @@ private Mono> listSinglePageAsync(Context context)
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
+ final String apiVersion = "2022-10-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .list(this.client.getEndpoint(), apiVersion, 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
new file mode 100644
index 000000000000..56cd4365f0f3
--- /dev/null
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceChangeDataImpl.java
@@ -0,0 +1,64 @@
+// 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
new file mode 100644
index 000000000000..e0e7c8dca71a
--- /dev/null
+++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceChangeListImpl.java
@@ -0,0 +1,52 @@
+// 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/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..37f9ee5f7964 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;
@@ -49,18 +49,6 @@ 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;
@@ -140,7 +128,6 @@ public OperationsClient getOperations() {
this.serializerAdapter = serializerAdapter;
this.defaultPollInterval = defaultPollInterval;
this.endpoint = endpoint;
- this.apiVersion = "2021-03-01";
this.resourceProviders = new ResourceProvidersClientImpl(this);
this.operations = new OperationsClientImpl(this);
}
@@ -161,10 +148,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry