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.resourcemanager azure-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 @@ jar Microsoft 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 resourcesHistoryAsync(ResourcesHistoryRequest request) { /** * 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. @@ -541,7 +288,7 @@ public Object resourcesHistory(ResourcesHistoryRequest request) { /** * 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. diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceProvidersImpl.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceProvidersImpl.java index 3afc8539c9677..acb4b04fc4169 100644 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceProvidersImpl.java +++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/implementation/ResourceProvidersImpl.java @@ -10,20 +10,11 @@ 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.QueryResponse; -import com.azure.resourcemanager.resourcegraph.models.ResourceChangeData; -import com.azure.resourcemanager.resourcegraph.models.ResourceChangeDetailsRequestParameters; -import com.azure.resourcemanager.resourcegraph.models.ResourceChangeList; -import com.azure.resourcemanager.resourcegraph.models.ResourceChangesRequestParameters; import com.azure.resourcemanager.resourcegraph.models.ResourceProviders; import com.azure.resourcemanager.resourcegraph.models.ResourcesHistoryRequest; import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; public final class ResourceProvidersImpl implements ResourceProviders { @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceProvidersImpl.class); @@ -39,62 +30,6 @@ public ResourceProvidersImpl( this.serviceManager = serviceManager; } - public ResourceChangeList resourceChanges(ResourceChangesRequestParameters parameters) { - ResourceChangeListInner inner = this.serviceClient().resourceChanges(parameters); - if (inner != null) { - return new ResourceChangeListImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response resourceChangesWithResponse( - ResourceChangesRequestParameters parameters, Context context) { - Response inner = this.serviceClient().resourceChangesWithResponse(parameters, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ResourceChangeListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public List resourceChangeDetails(ResourceChangeDetailsRequestParameters parameters) { - List inner = this.serviceClient().resourceChangeDetails(parameters); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ResourceChangeDataImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public Response> resourceChangeDetailsWithResponse( - ResourceChangeDetailsRequestParameters parameters, Context context) { - Response> inner = - this.serviceClient().resourceChangeDetailsWithResponse(parameters, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - inner - .getValue() - .stream() - .map(inner1 -> new ResourceChangeDataImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return null; - } - } - public QueryResponse resources(QueryRequest query) { QueryResponseInner inner = this.serviceClient().resources(query); if (inner != null) { diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/AuthorizationScopeFilter.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/AuthorizationScopeFilter.java new file mode 100644 index 0000000000000..1b30b0ad9c96f --- /dev/null +++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/AuthorizationScopeFilter.java @@ -0,0 +1,53 @@ +// 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.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for AuthorizationScopeFilter. */ +public enum AuthorizationScopeFilter { + /** Enum value AtScopeAndBelow. */ + AT_SCOPE_AND_BELOW("AtScopeAndBelow"), + + /** Enum value AtScopeAndAbove. */ + AT_SCOPE_AND_ABOVE("AtScopeAndAbove"), + + /** Enum value AtScopeExact. */ + AT_SCOPE_EXACT("AtScopeExact"), + + /** Enum value AtScopeAboveAndBelow. */ + AT_SCOPE_ABOVE_AND_BELOW("AtScopeAboveAndBelow"); + + /** The actual serialized value for a AuthorizationScopeFilter instance. */ + private final String value; + + AuthorizationScopeFilter(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AuthorizationScopeFilter instance. + * + * @param value the serialized value to parse. + * @return the parsed AuthorizationScopeFilter object, or null if unable to parse. + */ + @JsonCreator + public static AuthorizationScopeFilter fromString(String value) { + AuthorizationScopeFilter[] items = AuthorizationScopeFilter.values(); + for (AuthorizationScopeFilter item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ChangeCategory.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ChangeCategory.java deleted file mode 100644 index 443f99c8a8c12..0000000000000 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ChangeCategory.java +++ /dev/null @@ -1,47 +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.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for ChangeCategory. */ -public enum ChangeCategory { - /** Enum value User. */ - USER("User"), - - /** Enum value System. */ - SYSTEM("System"); - - /** The actual serialized value for a ChangeCategory instance. */ - private final String value; - - ChangeCategory(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ChangeCategory instance. - * - * @param value the serialized value to parse. - * @return the parsed ChangeCategory object, or null if unable to parse. - */ - @JsonCreator - public static ChangeCategory fromString(String value) { - ChangeCategory[] items = ChangeCategory.values(); - for (ChangeCategory item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ChangeType.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ChangeType.java deleted file mode 100644 index 84de98f11dd67..0000000000000 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ChangeType.java +++ /dev/null @@ -1,50 +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.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for ChangeType. */ -public enum ChangeType { - /** Enum value Create. */ - CREATE("Create"), - - /** Enum value Update. */ - UPDATE("Update"), - - /** Enum value Delete. */ - DELETE("Delete"); - - /** The actual serialized value for a ChangeType instance. */ - private final String value; - - ChangeType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ChangeType instance. - * - * @param value the serialized value to parse. - * @return the parsed ChangeType object, or null if unable to parse. - */ - @JsonCreator - public static ChangeType fromString(String value) { - ChangeType[] items = ChangeType.values(); - for (ChangeType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/DateTimeInterval.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/DateTimeInterval.java index 564c3d43d4007..d6966cd60f970 100644 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/DateTimeInterval.java +++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/DateTimeInterval.java @@ -12,7 +12,7 @@ /** An interval in time specifying the date and time for the inclusive start and exclusive end, i.e. `[start, end)`. */ @Fluent -public class DateTimeInterval { +public final class DateTimeInterval { @JsonIgnore private final ClientLogger logger = new ClientLogger(DateTimeInterval.class); /* diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/PropertyChangeType.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/PropertyChangeType.java deleted file mode 100644 index 2de713f05faf7..0000000000000 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/PropertyChangeType.java +++ /dev/null @@ -1,50 +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.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for PropertyChangeType. */ -public enum PropertyChangeType { - /** Enum value Insert. */ - INSERT("Insert"), - - /** Enum value Update. */ - UPDATE("Update"), - - /** Enum value Remove. */ - REMOVE("Remove"); - - /** The actual serialized value for a PropertyChangeType instance. */ - private final String value; - - PropertyChangeType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a PropertyChangeType instance. - * - * @param value the serialized value to parse. - * @return the parsed PropertyChangeType object, or null if unable to parse. - */ - @JsonCreator - public static PropertyChangeType fromString(String value) { - PropertyChangeType[] items = PropertyChangeType.values(); - for (PropertyChangeType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/QueryRequestOptions.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/QueryRequestOptions.java index 79e644a05d3a3..8727ce5dca234 100644 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/QueryRequestOptions.java +++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/QueryRequestOptions.java @@ -49,6 +49,13 @@ public final class QueryRequestOptions { @JsonProperty(value = "allowPartialScopes") private Boolean allowPartialScopes; + /* + * Defines what level of authorization resources should be returned based + * on the which subscriptions and management groups are passed as scopes. + */ + @JsonProperty(value = "authorizationScopeFilter") + private AuthorizationScopeFilter authorizationScopeFilter; + /** * Get the skipToken property: Continuation token for pagination, capturing the next page size and offset, as well * as the context of the query. @@ -157,6 +164,28 @@ public QueryRequestOptions withAllowPartialScopes(Boolean allowPartialScopes) { return this; } + /** + * Get the authorizationScopeFilter property: Defines what level of authorization resources should be returned based + * on the which subscriptions and management groups are passed as scopes. + * + * @return the authorizationScopeFilter value. + */ + public AuthorizationScopeFilter authorizationScopeFilter() { + return this.authorizationScopeFilter; + } + + /** + * Set the authorizationScopeFilter property: Defines what level of authorization resources should be returned based + * on the which subscriptions and management groups are passed as scopes. + * + * @param authorizationScopeFilter the authorizationScopeFilter value to set. + * @return the QueryRequestOptions object itself. + */ + public QueryRequestOptions withAuthorizationScopeFilter(AuthorizationScopeFilter authorizationScopeFilter) { + this.authorizationScopeFilter = authorizationScopeFilter; + return this; + } + /** * Validates the instance. * diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangeData.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangeData.java deleted file mode 100644 index 9787266e2cc08..0000000000000 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangeData.java +++ /dev/null @@ -1,61 +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.models; - -import com.azure.resourcemanager.resourcegraph.fluent.models.ResourceChangeDataInner; -import java.util.List; - -/** An immutable client-side representation of ResourceChangeData. */ -public interface ResourceChangeData { - /** - * Gets the resourceId property: The resource for a change. - * - * @return the resourceId value. - */ - String resourceId(); - - /** - * Gets the changeId property: The change ID. Valid and unique within the specified resource only. - * - * @return the changeId value. - */ - String changeId(); - - /** - * Gets the beforeSnapshot property: The snapshot before the change. - * - * @return the beforeSnapshot value. - */ - ResourceChangeDataBeforeSnapshot beforeSnapshot(); - - /** - * Gets the afterSnapshot property: The snapshot after the change. - * - * @return the afterSnapshot value. - */ - ResourceChangeDataAfterSnapshot afterSnapshot(); - - /** - * Gets the changeType property: The change type for snapshot. PropertyChanges will be provided in case of Update - * change type. - * - * @return the changeType value. - */ - ChangeType changeType(); - - /** - * Gets the propertyChanges property: An array of resource property change. - * - * @return the propertyChanges value. - */ - List propertyChanges(); - - /** - * Gets the inner com.azure.resourcemanager.resourcegraph.fluent.models.ResourceChangeDataInner object. - * - * @return the inner object. - */ - ResourceChangeDataInner innerModel(); -} diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangeDataAfterSnapshot.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangeDataAfterSnapshot.java deleted file mode 100644 index 099349c2edae0..0000000000000 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangeDataAfterSnapshot.java +++ /dev/null @@ -1,47 +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.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.time.OffsetDateTime; - -/** The snapshot after the change. */ -@Immutable -public final class ResourceChangeDataAfterSnapshot extends ResourceSnapshotData { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceChangeDataAfterSnapshot.class); - - /** {@inheritDoc} */ - @Override - public ResourceChangeDataAfterSnapshot withSnapshotId(String snapshotId) { - super.withSnapshotId(snapshotId); - return this; - } - - /** {@inheritDoc} */ - @Override - public ResourceChangeDataAfterSnapshot withTimestamp(OffsetDateTime timestamp) { - super.withTimestamp(timestamp); - return this; - } - - /** {@inheritDoc} */ - @Override - public ResourceChangeDataAfterSnapshot withContent(Object content) { - super.withContent(content); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangeDataBeforeSnapshot.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangeDataBeforeSnapshot.java deleted file mode 100644 index db49067bbf375..0000000000000 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangeDataBeforeSnapshot.java +++ /dev/null @@ -1,47 +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.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.time.OffsetDateTime; - -/** The snapshot before the change. */ -@Immutable -public final class ResourceChangeDataBeforeSnapshot extends ResourceSnapshotData { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceChangeDataBeforeSnapshot.class); - - /** {@inheritDoc} */ - @Override - public ResourceChangeDataBeforeSnapshot withSnapshotId(String snapshotId) { - super.withSnapshotId(snapshotId); - return this; - } - - /** {@inheritDoc} */ - @Override - public ResourceChangeDataBeforeSnapshot withTimestamp(OffsetDateTime timestamp) { - super.withTimestamp(timestamp); - return this; - } - - /** {@inheritDoc} */ - @Override - public ResourceChangeDataBeforeSnapshot withContent(Object content) { - super.withContent(content); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangeDetailsRequestParameters.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangeDetailsRequestParameters.java deleted file mode 100644 index 3816f70b8228c..0000000000000 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangeDetailsRequestParameters.java +++ /dev/null @@ -1,89 +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.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; - -/** The parameters for a specific change details request. */ -@Fluent -public final class ResourceChangeDetailsRequestParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceChangeDetailsRequestParameters.class); - - /* - * Specifies the list of resources for a change details request. - */ - @JsonProperty(value = "resourceIds", required = true) - private List resourceIds; - - /* - * Specifies the list of change IDs for a change details request. - */ - @JsonProperty(value = "changeIds", required = true) - private List changeIds; - - /** - * Get the resourceIds property: Specifies the list of resources for a change details request. - * - * @return the resourceIds value. - */ - public List resourceIds() { - return this.resourceIds; - } - - /** - * Set the resourceIds property: Specifies the list of resources for a change details request. - * - * @param resourceIds the resourceIds value to set. - * @return the ResourceChangeDetailsRequestParameters object itself. - */ - public ResourceChangeDetailsRequestParameters withResourceIds(List resourceIds) { - this.resourceIds = resourceIds; - return this; - } - - /** - * Get the changeIds property: Specifies the list of change IDs for a change details request. - * - * @return the changeIds value. - */ - public List changeIds() { - return this.changeIds; - } - - /** - * Set the changeIds property: Specifies the list of change IDs for a change details request. - * - * @param changeIds the changeIds value to set. - * @return the ResourceChangeDetailsRequestParameters object itself. - */ - public ResourceChangeDetailsRequestParameters withChangeIds(List changeIds) { - this.changeIds = changeIds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (resourceIds() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property resourceIds in model ResourceChangeDetailsRequestParameters")); - } - if (changeIds() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property changeIds in model ResourceChangeDetailsRequestParameters")); - } - } -} diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangeList.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangeList.java deleted file mode 100644 index b9fbc2f1986f0..0000000000000 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangeList.java +++ /dev/null @@ -1,36 +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.models; - -import com.azure.resourcemanager.resourcegraph.fluent.models.ResourceChangeListInner; -import java.util.List; - -/** An immutable client-side representation of ResourceChangeList. */ -public interface ResourceChangeList { - /** - * Gets 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. - */ - List changes(); - - /** - * Gets the skipToken property: Skip token that encodes the skip information while executing the current request. - * - * @return the skipToken value. - */ - Object skipToken(); - - /** - * Gets the inner com.azure.resourcemanager.resourcegraph.fluent.models.ResourceChangeListInner object. - * - * @return the inner object. - */ - ResourceChangeListInner innerModel(); -} diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangesRequestParameters.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangesRequestParameters.java deleted file mode 100644 index 4f8e159bb9fac..0000000000000 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangesRequestParameters.java +++ /dev/null @@ -1,241 +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.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; - -/** The parameters for a specific changes request. */ -@Fluent -public final class ResourceChangesRequestParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceChangesRequestParameters.class); - - /* - * Specifies the list of resources for a changes request. - */ - @JsonProperty(value = "resourceIds") - private List resourceIds; - - /* - * The subscription id of resources to query the changes from. - */ - @JsonProperty(value = "subscriptionId") - private String subscriptionId; - - /* - * Specifies the date and time interval for a changes request. - */ - @JsonProperty(value = "interval", required = true) - private ResourceChangesRequestParametersInterval interval; - - /* - * Acts as the continuation token for paged responses. - */ - @JsonProperty(value = "$skipToken") - private String skipToken; - - /* - * The maximum number of changes the client can accept in a paged response. - */ - @JsonProperty(value = "$top") - private Integer top; - - /* - * The table name to query resources from. - */ - @JsonProperty(value = "table") - private String table; - - /* - * The flag if set to true will fetch property changes - */ - @JsonProperty(value = "fetchPropertyChanges") - private Boolean fetchPropertyChanges; - - /* - * The flag if set to true will fetch change snapshots - */ - @JsonProperty(value = "fetchSnapshots") - private Boolean fetchSnapshots; - - /** - * Get the resourceIds property: Specifies the list of resources for a changes request. - * - * @return the resourceIds value. - */ - public List resourceIds() { - return this.resourceIds; - } - - /** - * Set the resourceIds property: Specifies the list of resources for a changes request. - * - * @param resourceIds the resourceIds value to set. - * @return the ResourceChangesRequestParameters object itself. - */ - public ResourceChangesRequestParameters withResourceIds(List resourceIds) { - this.resourceIds = resourceIds; - return this; - } - - /** - * Get the subscriptionId property: The subscription id of resources to query the changes from. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: The subscription id of resources to query the changes from. - * - * @param subscriptionId the subscriptionId value to set. - * @return the ResourceChangesRequestParameters object itself. - */ - public ResourceChangesRequestParameters withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the interval property: Specifies the date and time interval for a changes request. - * - * @return the interval value. - */ - public ResourceChangesRequestParametersInterval interval() { - return this.interval; - } - - /** - * Set the interval property: Specifies the date and time interval for a changes request. - * - * @param interval the interval value to set. - * @return the ResourceChangesRequestParameters object itself. - */ - public ResourceChangesRequestParameters withInterval(ResourceChangesRequestParametersInterval interval) { - this.interval = interval; - return this; - } - - /** - * Get the skipToken property: Acts as the continuation token for paged responses. - * - * @return the skipToken value. - */ - public String skipToken() { - return this.skipToken; - } - - /** - * Set the skipToken property: Acts as the continuation token for paged responses. - * - * @param skipToken the skipToken value to set. - * @return the ResourceChangesRequestParameters object itself. - */ - public ResourceChangesRequestParameters withSkipToken(String skipToken) { - this.skipToken = skipToken; - return this; - } - - /** - * Get the top property: The maximum number of changes the client can accept in a paged response. - * - * @return the top value. - */ - public Integer top() { - return this.top; - } - - /** - * Set the top property: The maximum number of changes the client can accept in a paged response. - * - * @param top the top value to set. - * @return the ResourceChangesRequestParameters object itself. - */ - public ResourceChangesRequestParameters withTop(Integer top) { - this.top = top; - return this; - } - - /** - * Get the table property: The table name to query resources from. - * - * @return the table value. - */ - public String table() { - return this.table; - } - - /** - * Set the table property: The table name to query resources from. - * - * @param table the table value to set. - * @return the ResourceChangesRequestParameters object itself. - */ - public ResourceChangesRequestParameters withTable(String table) { - this.table = table; - return this; - } - - /** - * Get the fetchPropertyChanges property: The flag if set to true will fetch property changes. - * - * @return the fetchPropertyChanges value. - */ - public Boolean fetchPropertyChanges() { - return this.fetchPropertyChanges; - } - - /** - * Set the fetchPropertyChanges property: The flag if set to true will fetch property changes. - * - * @param fetchPropertyChanges the fetchPropertyChanges value to set. - * @return the ResourceChangesRequestParameters object itself. - */ - public ResourceChangesRequestParameters withFetchPropertyChanges(Boolean fetchPropertyChanges) { - this.fetchPropertyChanges = fetchPropertyChanges; - return this; - } - - /** - * Get the fetchSnapshots property: The flag if set to true will fetch change snapshots. - * - * @return the fetchSnapshots value. - */ - public Boolean fetchSnapshots() { - return this.fetchSnapshots; - } - - /** - * Set the fetchSnapshots property: The flag if set to true will fetch change snapshots. - * - * @param fetchSnapshots the fetchSnapshots value to set. - * @return the ResourceChangesRequestParameters object itself. - */ - public ResourceChangesRequestParameters withFetchSnapshots(Boolean fetchSnapshots) { - this.fetchSnapshots = fetchSnapshots; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (interval() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property interval in model ResourceChangesRequestParameters")); - } else { - interval().validate(); - } - } -} diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangesRequestParametersInterval.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangesRequestParametersInterval.java deleted file mode 100644 index fd93e3a6b14a4..0000000000000 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceChangesRequestParametersInterval.java +++ /dev/null @@ -1,40 +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.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.time.OffsetDateTime; - -/** Specifies the date and time interval for a changes request. */ -@Immutable -public final class ResourceChangesRequestParametersInterval extends DateTimeInterval { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceChangesRequestParametersInterval.class); - - /** {@inheritDoc} */ - @Override - public ResourceChangesRequestParametersInterval withStart(OffsetDateTime start) { - super.withStart(start); - return this; - } - - /** {@inheritDoc} */ - @Override - public ResourceChangesRequestParametersInterval withEnd(OffsetDateTime end) { - super.withEnd(end); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourcePropertyChange.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourcePropertyChange.java deleted file mode 100644 index 1f56ba56ae716..0000000000000 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourcePropertyChange.java +++ /dev/null @@ -1,172 +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.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; - -/** The resource property change. */ -@Fluent -public final class ResourcePropertyChange { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourcePropertyChange.class); - - /* - * The property name - */ - @JsonProperty(value = "propertyName", required = true) - private String propertyName; - - /* - * The property value in before snapshot - */ - @JsonProperty(value = "beforeValue") - private String beforeValue; - - /* - * The property value in after snapshot - */ - @JsonProperty(value = "afterValue") - private String afterValue; - - /* - * The change category. - */ - @JsonProperty(value = "changeCategory", required = true) - private ChangeCategory changeCategory; - - /* - * The property change Type - */ - @JsonProperty(value = "propertyChangeType", required = true) - private PropertyChangeType propertyChangeType; - - /** - * Get the propertyName property: The property name. - * - * @return the propertyName value. - */ - public String propertyName() { - return this.propertyName; - } - - /** - * Set the propertyName property: The property name. - * - * @param propertyName the propertyName value to set. - * @return the ResourcePropertyChange object itself. - */ - public ResourcePropertyChange withPropertyName(String propertyName) { - this.propertyName = propertyName; - return this; - } - - /** - * Get the beforeValue property: The property value in before snapshot. - * - * @return the beforeValue value. - */ - public String beforeValue() { - return this.beforeValue; - } - - /** - * Set the beforeValue property: The property value in before snapshot. - * - * @param beforeValue the beforeValue value to set. - * @return the ResourcePropertyChange object itself. - */ - public ResourcePropertyChange withBeforeValue(String beforeValue) { - this.beforeValue = beforeValue; - return this; - } - - /** - * Get the afterValue property: The property value in after snapshot. - * - * @return the afterValue value. - */ - public String afterValue() { - return this.afterValue; - } - - /** - * Set the afterValue property: The property value in after snapshot. - * - * @param afterValue the afterValue value to set. - * @return the ResourcePropertyChange object itself. - */ - public ResourcePropertyChange withAfterValue(String afterValue) { - this.afterValue = afterValue; - return this; - } - - /** - * Get the changeCategory property: The change category. - * - * @return the changeCategory value. - */ - public ChangeCategory changeCategory() { - return this.changeCategory; - } - - /** - * Set the changeCategory property: The change category. - * - * @param changeCategory the changeCategory value to set. - * @return the ResourcePropertyChange object itself. - */ - public ResourcePropertyChange withChangeCategory(ChangeCategory changeCategory) { - this.changeCategory = changeCategory; - return this; - } - - /** - * Get the propertyChangeType property: The property change Type. - * - * @return the propertyChangeType value. - */ - public PropertyChangeType propertyChangeType() { - return this.propertyChangeType; - } - - /** - * Set the propertyChangeType property: The property change Type. - * - * @param propertyChangeType the propertyChangeType value to set. - * @return the ResourcePropertyChange object itself. - */ - public ResourcePropertyChange withPropertyChangeType(PropertyChangeType propertyChangeType) { - this.propertyChangeType = propertyChangeType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (propertyName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property propertyName in model ResourcePropertyChange")); - } - if (changeCategory() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property changeCategory in model ResourcePropertyChange")); - } - if (propertyChangeType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property propertyChangeType in model ResourcePropertyChange")); - } - } -} diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceProviders.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceProviders.java index 7e9eadea07355..ef4c3db4500a2 100644 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceProviders.java +++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceProviders.java @@ -6,58 +6,9 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import java.util.List; /** Resource collection API of ResourceProviders. */ public interface ResourceProviders { - /** - * 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. - */ - ResourceChangeList 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. - */ - 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. - */ - 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. - */ - Response> resourceChangeDetailsWithResponse( - ResourceChangeDetailsRequestParameters parameters, Context context); - /** * Queries the resources managed by Azure Resource Manager for scopes specified in the request. * @@ -84,7 +35,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. @@ -95,7 +46,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/models/ResourceSnapshotData.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceSnapshotData.java deleted file mode 100644 index d87221d13f2f1..0000000000000 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourceSnapshotData.java +++ /dev/null @@ -1,120 +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.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.time.OffsetDateTime; - -/** Data on a specific resource snapshot. */ -@Fluent -public class ResourceSnapshotData { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSnapshotData.class); - - /* - * The ID of the snapshot. - */ - @JsonProperty(value = "snapshotId") - private String snapshotId; - - /* - * The time when the snapshot was created. - * The snapshot timestamp provides an approximation as to when a - * modification to a resource was detected. There can be a difference - * between the actual modification time and the detection time. This is - * due to differences in how operations that modify a resource are - * processed, versus how operation that record resource snapshots are - * processed. - */ - @JsonProperty(value = "timestamp", required = true) - private OffsetDateTime timestamp; - - /* - * The resource snapshot content (in resourceChangeDetails response only). - */ - @JsonProperty(value = "content") - private Object content; - - /** - * Get the snapshotId property: The ID of the snapshot. - * - * @return the snapshotId value. - */ - public String snapshotId() { - return this.snapshotId; - } - - /** - * Set the snapshotId property: The ID of the snapshot. - * - * @param snapshotId the snapshotId value to set. - * @return the ResourceSnapshotData object itself. - */ - public ResourceSnapshotData withSnapshotId(String snapshotId) { - this.snapshotId = snapshotId; - return this; - } - - /** - * Get the timestamp property: The time when the snapshot was created. The snapshot timestamp provides an - * approximation as to when a modification to a resource was detected. There can be a difference between the actual - * modification time and the detection time. This is due to differences in how operations that modify a resource are - * processed, versus how operation that record resource snapshots are processed. - * - * @return the timestamp value. - */ - public OffsetDateTime timestamp() { - return this.timestamp; - } - - /** - * Set the timestamp property: The time when the snapshot was created. The snapshot timestamp provides an - * approximation as to when a modification to a resource was detected. There can be a difference between the actual - * modification time and the detection time. This is due to differences in how operations that modify a resource are - * processed, versus how operation that record resource snapshots are processed. - * - * @param timestamp the timestamp value to set. - * @return the ResourceSnapshotData object itself. - */ - public ResourceSnapshotData withTimestamp(OffsetDateTime timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Get the content property: The resource snapshot content (in resourceChangeDetails response only). - * - * @return the content value. - */ - public Object content() { - return this.content; - } - - /** - * Set the content property: The resource snapshot content (in resourceChangeDetails response only). - * - * @param content the content value to set. - * @return the ResourceSnapshotData object itself. - */ - public ResourceSnapshotData withContent(Object content) { - this.content = content; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (timestamp() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property timestamp in model ResourceSnapshotData")); - } - } -} diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourcesHistoryRequest.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourcesHistoryRequest.java index a1257e83af509..66092da37afa8 100644 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourcesHistoryRequest.java +++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourcesHistoryRequest.java @@ -10,37 +10,38 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The ResourcesHistoryRequest model. */ +/** Describes a history request to be executed. */ @Fluent public final class ResourcesHistoryRequest { @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourcesHistoryRequest.class); /* - * The subscriptions property. + * Azure subscriptions against which to execute the query. */ @JsonProperty(value = "subscriptions") private List subscriptions; /* - * The query property. + * The resources query. */ @JsonProperty(value = "query") private String query; /* - * The options property. + * The history request evaluation options */ @JsonProperty(value = "options") private ResourcesHistoryRequestOptions options; /* - * The managementGroupId property. + * Azure management groups against which to execute the query. Example: [ + * 'mg1', 'mg2' ] */ - @JsonProperty(value = "managementGroupId") - private String managementGroupId; + @JsonProperty(value = "managementGroups") + private List managementGroups; /** - * Get the subscriptions property: The subscriptions property. + * Get the subscriptions property: Azure subscriptions against which to execute the query. * * @return the subscriptions value. */ @@ -49,7 +50,7 @@ public List subscriptions() { } /** - * Set the subscriptions property: The subscriptions property. + * Set the subscriptions property: Azure subscriptions against which to execute the query. * * @param subscriptions the subscriptions value to set. * @return the ResourcesHistoryRequest object itself. @@ -60,7 +61,7 @@ public ResourcesHistoryRequest withSubscriptions(List subscriptions) { } /** - * Get the query property: The query property. + * Get the query property: The resources query. * * @return the query value. */ @@ -69,7 +70,7 @@ public String query() { } /** - * Set the query property: The query property. + * Set the query property: The resources query. * * @param query the query value to set. * @return the ResourcesHistoryRequest object itself. @@ -80,7 +81,7 @@ public ResourcesHistoryRequest withQuery(String query) { } /** - * Get the options property: The options property. + * Get the options property: The history request evaluation options. * * @return the options value. */ @@ -89,7 +90,7 @@ public ResourcesHistoryRequestOptions options() { } /** - * Set the options property: The options property. + * Set the options property: The history request evaluation options. * * @param options the options value to set. * @return the ResourcesHistoryRequest object itself. @@ -100,22 +101,24 @@ public ResourcesHistoryRequest withOptions(ResourcesHistoryRequestOptions option } /** - * Get the managementGroupId property: The managementGroupId property. + * Get the managementGroups property: Azure management groups against which to execute the query. Example: [ 'mg1', + * 'mg2' ]. * - * @return the managementGroupId value. + * @return the managementGroups value. */ - public String managementGroupId() { - return this.managementGroupId; + public List managementGroups() { + return this.managementGroups; } /** - * Set the managementGroupId property: The managementGroupId property. + * Set the managementGroups property: Azure management groups against which to execute the query. Example: [ 'mg1', + * 'mg2' ]. * - * @param managementGroupId the managementGroupId value to set. + * @param managementGroups the managementGroups value to set. * @return the ResourcesHistoryRequest object itself. */ - public ResourcesHistoryRequest withManagementGroupId(String managementGroupId) { - this.managementGroupId = managementGroupId; + public ResourcesHistoryRequest withManagementGroups(List managementGroups) { + this.managementGroups = managementGroups; return this; } diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourcesHistoryRequestOptions.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourcesHistoryRequestOptions.java index afec50d51109c..0d5c1dc7233a9 100644 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourcesHistoryRequestOptions.java +++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourcesHistoryRequestOptions.java @@ -9,45 +9,46 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ResourcesHistoryRequestOptions model. */ +/** The options for history request evaluation. */ @Fluent public final class ResourcesHistoryRequestOptions { @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourcesHistoryRequestOptions.class); /* - * An interval in time specifying the date and time for the inclusive start - * and exclusive end, i.e. `[start, end)`. + * The time interval used to fetch history. */ @JsonProperty(value = "interval") private DateTimeInterval interval; /* - * The $top property. + * The maximum number of rows that the query should return. Overrides the + * page size when ```$skipToken``` property is present. */ @JsonProperty(value = "$top") private Integer top; /* - * The $skip property. + * The number of rows to skip from the beginning of the results. Overrides + * the next page offset when ```$skipToken``` property is present. */ @JsonProperty(value = "$skip") private Integer skip; /* - * The $skipToken property. + * Continuation token for pagination, capturing the next page size and + * offset, as well as the context of the query. */ @JsonProperty(value = "$skipToken") private String skipToken; /* - * The resultFormat property. + * Defines in which format query result returned. */ @JsonProperty(value = "resultFormat") - private ResourcesHistoryRequestOptionsResultFormat resultFormat; + private ResultFormat resultFormat; /** - * Get the interval property: An interval in time specifying the date and time for the inclusive start and exclusive - * end, i.e. `[start, end)`. + * Get the interval property: The time interval used to fetch history. * * @return the interval value. */ @@ -56,8 +57,7 @@ public DateTimeInterval interval() { } /** - * Set the interval property: An interval in time specifying the date and time for the inclusive start and exclusive - * end, i.e. `[start, end)`. + * Set the interval property: The time interval used to fetch history. * * @param interval the interval value to set. * @return the ResourcesHistoryRequestOptions object itself. @@ -68,7 +68,8 @@ public ResourcesHistoryRequestOptions withInterval(DateTimeInterval interval) { } /** - * Get the top property: The $top property. + * Get the top property: The maximum number of rows that the query should return. Overrides the page size when + * ```$skipToken``` property is present. * * @return the top value. */ @@ -77,7 +78,8 @@ public Integer top() { } /** - * Set the top property: The $top property. + * Set the top property: The maximum number of rows that the query should return. Overrides the page size when + * ```$skipToken``` property is present. * * @param top the top value to set. * @return the ResourcesHistoryRequestOptions object itself. @@ -88,7 +90,8 @@ public ResourcesHistoryRequestOptions withTop(Integer top) { } /** - * Get the skip property: The $skip property. + * Get the skip property: The number of rows to skip from the beginning of the results. Overrides the next page + * offset when ```$skipToken``` property is present. * * @return the skip value. */ @@ -97,7 +100,8 @@ public Integer skip() { } /** - * Set the skip property: The $skip property. + * Set the skip property: The number of rows to skip from the beginning of the results. Overrides the next page + * offset when ```$skipToken``` property is present. * * @param skip the skip value to set. * @return the ResourcesHistoryRequestOptions object itself. @@ -108,7 +112,8 @@ public ResourcesHistoryRequestOptions withSkip(Integer skip) { } /** - * Get the skipToken property: The $skipToken property. + * Get the skipToken property: Continuation token for pagination, capturing the next page size and offset, as well + * as the context of the query. * * @return the skipToken value. */ @@ -117,7 +122,8 @@ public String skipToken() { } /** - * Set the skipToken property: The $skipToken property. + * Set the skipToken property: Continuation token for pagination, capturing the next page size and offset, as well + * as the context of the query. * * @param skipToken the skipToken value to set. * @return the ResourcesHistoryRequestOptions object itself. @@ -128,21 +134,21 @@ public ResourcesHistoryRequestOptions withSkipToken(String skipToken) { } /** - * Get the resultFormat property: The resultFormat property. + * Get the resultFormat property: Defines in which format query result returned. * * @return the resultFormat value. */ - public ResourcesHistoryRequestOptionsResultFormat resultFormat() { + public ResultFormat resultFormat() { return this.resultFormat; } /** - * Set the resultFormat property: The resultFormat property. + * Set the resultFormat property: Defines in which format query result returned. * * @param resultFormat the resultFormat value to set. * @return the ResourcesHistoryRequestOptions object itself. */ - public ResourcesHistoryRequestOptions withResultFormat(ResourcesHistoryRequestOptionsResultFormat resultFormat) { + public ResourcesHistoryRequestOptions withResultFormat(ResultFormat resultFormat) { this.resultFormat = resultFormat; return this; } diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourcesHistoryRequestOptionsResultFormat.java b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourcesHistoryRequestOptionsResultFormat.java deleted file mode 100644 index f5c653d0c01dc..0000000000000 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/src/main/java/com/azure/resourcemanager/resourcegraph/models/ResourcesHistoryRequestOptionsResultFormat.java +++ /dev/null @@ -1,35 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ResourcesHistoryRequestOptionsResultFormat. */ -public final class ResourcesHistoryRequestOptionsResultFormat - extends ExpandableStringEnum { - /** Static value table for ResourcesHistoryRequestOptionsResultFormat. */ - public static final ResourcesHistoryRequestOptionsResultFormat TABLE = fromString("table"); - - /** Static value objectArray for ResourcesHistoryRequestOptionsResultFormat. */ - public static final ResourcesHistoryRequestOptionsResultFormat OBJECT_ARRAY = fromString("objectArray"); - - /** - * Creates or finds a ResourcesHistoryRequestOptionsResultFormat from its string representation. - * - * @param name a name to look for. - * @return the corresponding ResourcesHistoryRequestOptionsResultFormat. - */ - @JsonCreator - public static ResourcesHistoryRequestOptionsResultFormat fromString(String name) { - return fromString(name, ResourcesHistoryRequestOptionsResultFormat.class); - } - - /** @return known ResourcesHistoryRequestOptionsResultFormat values. */ - public static Collection values() { - return values(ResourcesHistoryRequestOptionsResultFormat.class); - } -}