diff --git a/sdk/attestation/azure-resourcemanager-attestation/CHANGELOG.md b/sdk/attestation/azure-resourcemanager-attestation/CHANGELOG.md
index 18ee64fef580..19766f739b8d 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/CHANGELOG.md
+++ b/sdk/attestation/azure-resourcemanager-attestation/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2022-03-29)
+- Azure Resource Manager Attestation client library for Java. This package contains Microsoft Azure SDK for Attestation Management SDK. Various APIs for managing resources in attestation service. This primarily encompasses per-provider management. Package tag package-2020-10-01. 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.1 (2021-04-12)
diff --git a/sdk/attestation/azure-resourcemanager-attestation/README.md b/sdk/attestation/azure-resourcemanager-attestation/README.md
index 4e4cd3add358..c0cd84a5d9cf 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/README.md
+++ b/sdk/attestation/azure-resourcemanager-attestation/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-attestation
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/attestation/azure-resourcemanager-attestation/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/attestation/azure-resourcemanager-attestation/SAMPLE.md b/sdk/attestation/azure-resourcemanager-attestation/SAMPLE.md
new file mode 100644
index 000000000000..e13223d78dad
--- /dev/null
+++ b/sdk/attestation/azure-resourcemanager-attestation/SAMPLE.md
@@ -0,0 +1,346 @@
+# Code snippets and samples
+
+
+## AttestationProviders
+
+- [Create](#attestationproviders_create)
+- [Delete](#attestationproviders_delete)
+- [GetByResourceGroup](#attestationproviders_getbyresourcegroup)
+- [GetDefaultByLocation](#attestationproviders_getdefaultbylocation)
+- [List](#attestationproviders_list)
+- [ListByResourceGroup](#attestationproviders_listbyresourcegroup)
+- [ListDefault](#attestationproviders_listdefault)
+- [Update](#attestationproviders_update)
+
+## Operations
+
+- [List](#operations_list)
+
+## PrivateEndpointConnections
+
+- [Create](#privateendpointconnections_create)
+- [Delete](#privateendpointconnections_delete)
+- [Get](#privateendpointconnections_get)
+- [List](#privateendpointconnections_list)
+### AttestationProviders_Create
+
+```java
+import com.azure.resourcemanager.attestation.models.AttestationServiceCreationSpecificParams;
+
+/** Samples for AttestationProviders Create. */
+public final class AttestationProvidersCreateSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Create_AttestationProvider.json
+ */
+ /**
+ * Sample code: AttestationProviders_Create.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProvidersCreate(com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager
+ .attestationProviders()
+ .define("myattestationprovider")
+ .withRegion((String) null)
+ .withExistingResourceGroup("MyResourceGroup")
+ .withProperties((AttestationServiceCreationSpecificParams) null)
+ .create();
+ }
+}
+```
+
+### AttestationProviders_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for AttestationProviders Delete. */
+public final class AttestationProvidersDeleteSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Delete_AttestationProvider.json
+ */
+ /**
+ * Sample code: AttestationProviders_Delete.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProvidersDelete(com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager
+ .attestationProviders()
+ .deleteWithResponse("sample-resource-group", "myattestationprovider", Context.NONE);
+ }
+}
+```
+
+### AttestationProviders_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for AttestationProviders GetByResourceGroup. */
+public final class AttestationProvidersGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Get_AttestationProvider.json
+ */
+ /**
+ * Sample code: AttestationProviders_Get.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProvidersGet(com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager
+ .attestationProviders()
+ .getByResourceGroupWithResponse("MyResourceGroup", "myattestationprovider", Context.NONE);
+ }
+}
+```
+
+### AttestationProviders_GetDefaultByLocation
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for AttestationProviders GetDefaultByLocation. */
+public final class AttestationProvidersGetDefaultByLocationSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Get_DefaultProviderByLocation.json
+ */
+ /**
+ * Sample code: AttestationProviders_GetDefaultWithLocation.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProvidersGetDefaultWithLocation(
+ com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager.attestationProviders().getDefaultByLocationWithResponse("Central US", Context.NONE);
+ }
+}
+```
+
+### AttestationProviders_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for AttestationProviders List. */
+public final class AttestationProvidersListSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Get_AttestationProvidersList.json
+ */
+ /**
+ * Sample code: AttestationProviders_List.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProvidersList(com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager.attestationProviders().listWithResponse(Context.NONE);
+ }
+}
+```
+
+### AttestationProviders_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for AttestationProviders ListByResourceGroup. */
+public final class AttestationProvidersListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Get_AttestationProvidersListByResourceGroup.json
+ */
+ /**
+ * Sample code: AttestationProviders_ListByResourceGroup.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProvidersListByResourceGroup(
+ com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager.attestationProviders().listByResourceGroupWithResponse("testrg1", Context.NONE);
+ }
+}
+```
+
+### AttestationProviders_ListDefault
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for AttestationProviders ListDefault. */
+public final class AttestationProvidersListDefaultSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Get_DefaultProviders.json
+ */
+ /**
+ * Sample code: AttestationProviders_GetDefault.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProvidersGetDefault(
+ com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager.attestationProviders().listDefaultWithResponse(Context.NONE);
+ }
+}
+```
+
+### AttestationProviders_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.attestation.models.AttestationProvider;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for AttestationProviders Update. */
+public final class AttestationProvidersUpdateSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Update_AttestationProvider.json
+ */
+ /**
+ * Sample code: AttestationProviders_Update.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProvidersUpdate(com.azure.resourcemanager.attestation.AttestationManager manager) {
+ AttestationProvider resource =
+ manager
+ .attestationProviders()
+ .getByResourceGroupWithResponse("MyResourceGroup", "myattestationprovider", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("Property1", "Value1", "Property2", "Value2", "Property3", "Value3")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Operations_List.json
+ */
+ /**
+ * Sample code: Operations_List.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void operationsList(com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager.operations().listWithResponse(Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_Create
+
+```java
+import com.azure.resourcemanager.attestation.models.PrivateEndpointServiceConnectionStatus;
+import com.azure.resourcemanager.attestation.models.PrivateLinkServiceConnectionState;
+
+/** Samples for PrivateEndpointConnections Create. */
+public final class PrivateEndpointConnectionsCreateSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/AttestationProviderPutPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: AttestationProviderPutPrivateEndpointConnection.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProviderPutPrivateEndpointConnection(
+ com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager
+ .privateEndpointConnections()
+ .define("{privateEndpointConnectionName}")
+ .withExistingAttestationProvider("res7687", "sto9699")
+ .withPrivateLinkServiceConnectionState(
+ new PrivateLinkServiceConnectionState()
+ .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)
+ .withDescription("Auto-Approved"))
+ .create();
+ }
+}
+```
+
+### PrivateEndpointConnections_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Delete. */
+public final class PrivateEndpointConnectionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/AttestationProviderDeletePrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: AttestationProviderDeletePrivateEndpointConnection.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProviderDeletePrivateEndpointConnection(
+ com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager
+ .privateEndpointConnections()
+ .deleteWithResponse("res6977", "sto2527", "{privateEndpointConnectionName}", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Get. */
+public final class PrivateEndpointConnectionsGetSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/AttestationProviderGetPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: AttestationProviderGetPrivateEndpointConnection.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProviderGetPrivateEndpointConnection(
+ com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager
+ .privateEndpointConnections()
+ .getWithResponse("res6977", "sto2527", "{privateEndpointConnectionName}", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections List. */
+public final class PrivateEndpointConnectionsListSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/AttestationProviderListPrivateEndpointConnections.json
+ */
+ /**
+ * Sample code: AttestationProviderListPrivateEndpointConnections.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProviderListPrivateEndpointConnections(
+ com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager.privateEndpointConnections().list("res6977", "sto2527", Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/attestation/azure-resourcemanager-attestation/pom.xml b/sdk/attestation/azure-resourcemanager-attestation/pom.xml
index 0dac672316c9..216145ede6d5 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/pom.xml
+++ b/sdk/attestation/azure-resourcemanager-attestation/pom.xml
@@ -1,55 +1,55 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-attestation
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-attestation
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for Attestation Management
- This package contains Microsoft Azure SDK for Attestation Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Various APIs for managing resources in attestation service. This primarily encompasses per-provider management. Package tag package-2020-10-01.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for Attestation Management
+ This package contains Microsoft Azure SDK for Attestation Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Various APIs for managing resources in attestation service. This primarily encompasses per-provider management. Package tag package-2020-10-01.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
- true
-
-
-
- com.azure
- azure-core
- 1.26.0
-
-
- com.azure
- azure-core-management
- 1.5.3
-
-
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
+
+
+
+ com.azure
+ azure-core
+ 1.26.0
+
+
+ com.azure
+ azure-core-management
+ 1.5.3
+
+
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/AttestationManager.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/AttestationManager.java
index e137d35ffc2f..21e88612672e 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/AttestationManager.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/AttestationManager.java
@@ -8,8 +8,8 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -17,6 +17,7 @@
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -33,6 +34,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/**
* Entry point to AttestationManager. Various APIs for managing resources in attestation service. This primarily
@@ -83,11 +85,12 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private Duration defaultPollInterval;
@@ -127,6 +130,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -145,9 +159,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -183,20 +199,33 @@ public AttestationManager authenticate(TokenCredential credential, AzureProfile
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
- policies.addAll(this.policies);
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/AttestationProvidersClient.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/AttestationProvidersClient.java
index d2591bfca7c5..547768e0682b 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/AttestationProvidersClient.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/AttestationProvidersClient.java
@@ -37,7 +37,7 @@ public interface AttestationProvidersClient {
* @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 the status of Attestation Provider.
+ * @return the status of Attestation Provider along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -68,7 +68,7 @@ AttestationProviderInner create(
* @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 attestation service response message.
+ * @return attestation service response message along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createWithResponse(
@@ -102,7 +102,7 @@ AttestationProviderInner update(
* @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 attestation service response message.
+ * @return attestation service response message along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
@@ -129,7 +129,7 @@ Response updateWithResponse(
* @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 the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String resourceGroupName, String providerName, Context context);
@@ -151,7 +151,7 @@ Response updateWithResponse(
* @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 attestation Providers List.
+ * @return attestation Providers List along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response listWithResponse(Context context);
@@ -176,7 +176,7 @@ Response updateWithResponse(
* @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 attestation Providers List.
+ * @return attestation Providers List along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response listByResourceGroupWithResponse(
@@ -199,7 +199,7 @@ Response listByResourceGroupWithResponse(
* @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 the default provider.
+ * @return the default provider along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response listDefaultWithResponse(Context context);
@@ -224,7 +224,7 @@ Response listByResourceGroupWithResponse(
* @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 the default provider by location.
+ * @return the default provider by location along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getDefaultByLocationWithResponse(String location, Context context);
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/OperationsClient.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/OperationsClient.java
index 709f15ffb2f0..1e6aaa80445e 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/OperationsClient.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/OperationsClient.java
@@ -29,7 +29,7 @@ public interface OperationsClient {
* @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 list of supported operations.
+ * @return list of supported operations along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response listWithResponse(Context context);
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/PrivateEndpointConnectionsClient.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/PrivateEndpointConnectionsClient.java
index 2bc3b18a7b99..0935bd0ead08 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/PrivateEndpointConnectionsClient.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/PrivateEndpointConnectionsClient.java
@@ -21,7 +21,8 @@ public interface PrivateEndpointConnectionsClient {
* @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 list of private endpoint connection associated with the specified storage account.
+ * @return list of private endpoint connection associated with the specified storage account as paginated response
+ * with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String providerName);
@@ -35,7 +36,8 @@ public interface PrivateEndpointConnectionsClient {
* @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 list of private endpoint connection associated with the specified storage account.
+ * @return list of private endpoint connection associated with the specified storage account as paginated response
+ * with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String providerName, Context context);
@@ -67,7 +69,8 @@ PrivateEndpointConnectionInner get(
* @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 the specified private endpoint connection associated with the attestation provider.
+ * @return the specified private endpoint connection associated with the attestation provider along with {@link
+ * Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -105,7 +108,7 @@ PrivateEndpointConnectionInner create(
* @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 the Private Endpoint Connection resource.
+ * @return the Private Endpoint Connection resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createWithResponse(
@@ -140,7 +143,7 @@ Response createWithResponse(
* @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 the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/AttestationProviderInner.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/AttestationProviderInner.java
index eb87b8c43293..6dc1d9d20d7c 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/AttestationProviderInner.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/AttestationProviderInner.java
@@ -5,22 +5,16 @@
package com.azure.resourcemanager.attestation.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.attestation.models.AttestationServiceStatus;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
/** Attestation service response message. */
-@JsonFlatten
@Fluent
-public class AttestationProviderInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AttestationProviderInner.class);
-
+public final class AttestationProviderInner extends Resource {
/*
* The system metadata relating to this resource
*/
@@ -28,29 +22,10 @@ public class AttestationProviderInner extends Resource {
private SystemData systemData;
/*
- * Trust model for the attestation provider.
- */
- @JsonProperty(value = "properties.trustModel")
- private String trustModel;
-
- /*
- * Status of attestation service.
- */
- @JsonProperty(value = "properties.status")
- private AttestationServiceStatus status;
-
- /*
- * Gets the uri of attestation service
- */
- @JsonProperty(value = "properties.attestUri")
- private String attestUri;
-
- /*
- * List of private endpoint connections associated with the attestation
- * provider.
+ * Describes Attestation service status.
*/
- @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
- private List privateEndpointConnections;
+ @JsonProperty(value = "properties")
+ private StatusResult innerProperties;
/**
* Get the systemData property: The system metadata relating to this resource.
@@ -61,13 +36,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the innerProperties property: Describes Attestation service status.
+ *
+ * @return the innerProperties value.
+ */
+ private StatusResult innerProperties() {
+ return this.innerProperties;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public AttestationProviderInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public AttestationProviderInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
/**
* Get the trustModel property: Trust model for the attestation provider.
*
* @return the trustModel value.
*/
public String trustModel() {
- return this.trustModel;
+ return this.innerProperties() == null ? null : this.innerProperties().trustModel();
}
/**
@@ -77,7 +75,10 @@ public String trustModel() {
* @return the AttestationProviderInner object itself.
*/
public AttestationProviderInner withTrustModel(String trustModel) {
- this.trustModel = trustModel;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new StatusResult();
+ }
+ this.innerProperties().withTrustModel(trustModel);
return this;
}
@@ -87,7 +88,7 @@ public AttestationProviderInner withTrustModel(String trustModel) {
* @return the status value.
*/
public AttestationServiceStatus status() {
- return this.status;
+ return this.innerProperties() == null ? null : this.innerProperties().status();
}
/**
@@ -97,7 +98,10 @@ public AttestationServiceStatus status() {
* @return the AttestationProviderInner object itself.
*/
public AttestationProviderInner withStatus(AttestationServiceStatus status) {
- this.status = status;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new StatusResult();
+ }
+ this.innerProperties().withStatus(status);
return this;
}
@@ -107,7 +111,7 @@ public AttestationProviderInner withStatus(AttestationServiceStatus status) {
* @return the attestUri value.
*/
public String attestUri() {
- return this.attestUri;
+ return this.innerProperties() == null ? null : this.innerProperties().attestUri();
}
/**
@@ -117,7 +121,10 @@ public String attestUri() {
* @return the AttestationProviderInner object itself.
*/
public AttestationProviderInner withAttestUri(String attestUri) {
- this.attestUri = attestUri;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new StatusResult();
+ }
+ this.innerProperties().withAttestUri(attestUri);
return this;
}
@@ -128,21 +135,7 @@ public AttestationProviderInner withAttestUri(String attestUri) {
* @return the privateEndpointConnections value.
*/
public List privateEndpointConnections() {
- return this.privateEndpointConnections;
- }
-
- /** {@inheritDoc} */
- @Override
- public AttestationProviderInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public AttestationProviderInner withTags(Map tags) {
- super.withTags(tags);
- return this;
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections();
}
/**
@@ -151,8 +144,8 @@ public AttestationProviderInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (privateEndpointConnections() != null) {
- privateEndpointConnections().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/AttestationProviderListResultInner.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/AttestationProviderListResultInner.java
index 309ce1537918..cdb1fe3bb812 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/AttestationProviderListResultInner.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/AttestationProviderListResultInner.java
@@ -6,16 +6,12 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.SystemData;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Attestation Providers List. */
@Fluent
public final class AttestationProviderListResultInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AttestationProviderListResultInner.class);
-
/*
* The system metadata relating to this resource
*/
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/OperationListInner.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/OperationListInner.java
index 72cade6b8a2e..634e321a7740 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/OperationListInner.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/OperationListInner.java
@@ -6,17 +6,13 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.SystemData;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.attestation.models.OperationsDefinition;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** List of supported operations. */
@Fluent
public final class OperationListInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListInner.class);
-
/*
* The system metadata relating to this resource
*/
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/PrivateEndpointConnectionInner.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/PrivateEndpointConnectionInner.java
index ce8d7a32dda0..ea3b7b22522b 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/PrivateEndpointConnectionInner.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/PrivateEndpointConnectionInner.java
@@ -5,39 +5,29 @@
package com.azure.resourcemanager.attestation.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.attestation.models.PrivateEndpoint;
import com.azure.resourcemanager.attestation.models.PrivateEndpointConnectionProvisioningState;
import com.azure.resourcemanager.attestation.models.PrivateLinkServiceConnectionState;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The Private Endpoint Connection resource. */
-@JsonFlatten
@Fluent
-public class PrivateEndpointConnectionInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class);
-
- /*
- * The resource of private end point.
- */
- @JsonProperty(value = "properties.privateEndpoint")
- private PrivateEndpoint privateEndpoint;
-
+public final class PrivateEndpointConnectionInner extends ProxyResource {
/*
- * A collection of information about the state of the connection between
- * service consumer and provider.
+ * Resource properties.
*/
- @JsonProperty(value = "properties.privateLinkServiceConnectionState")
- private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+ @JsonProperty(value = "properties")
+ private PrivateEndpointConnectionProperties innerProperties;
- /*
- * The provisioning state of the private endpoint connection resource.
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private PrivateEndpointConnectionProvisioningState provisioningState;
+ private PrivateEndpointConnectionProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the privateEndpoint property: The resource of private end point.
@@ -45,7 +35,7 @@ public class PrivateEndpointConnectionInner extends ProxyResource {
* @return the privateEndpoint value.
*/
public PrivateEndpoint privateEndpoint() {
- return this.privateEndpoint;
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint();
}
/**
@@ -55,7 +45,10 @@ public PrivateEndpoint privateEndpoint() {
* @return the PrivateEndpointConnectionInner object itself.
*/
public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
- this.privateEndpoint = privateEndpoint;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateEndpoint(privateEndpoint);
return this;
}
@@ -66,7 +59,7 @@ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privat
* @return the privateLinkServiceConnectionState value.
*/
public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
- return this.privateLinkServiceConnectionState;
+ return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState();
}
/**
@@ -78,7 +71,10 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
*/
public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(
PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
- this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState);
return this;
}
@@ -88,7 +84,7 @@ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(
* @return the provisioningState value.
*/
public PrivateEndpointConnectionProvisioningState provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -97,11 +93,8 @@ public PrivateEndpointConnectionProvisioningState provisioningState() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (privateEndpoint() != null) {
- privateEndpoint().validate();
- }
- if (privateLinkServiceConnectionState() != null) {
- privateLinkServiceConnectionState().validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/PrivateEndpointConnectionProperties.java
new file mode 100644
index 000000000000..c8cb0b6ed117
--- /dev/null
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/PrivateEndpointConnectionProperties.java
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.attestation.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.attestation.models.PrivateEndpoint;
+import com.azure.resourcemanager.attestation.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.attestation.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of the PrivateEndpointConnectProperties. */
+@Fluent
+public final class PrivateEndpointConnectionProperties {
+ /*
+ * The resource of private end point.
+ */
+ @JsonProperty(value = "privateEndpoint")
+ private PrivateEndpoint privateEndpoint;
+
+ /*
+ * A collection of information about the state of the connection between
+ * service consumer and provider.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState", required = true)
+ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /*
+ * The provisioning state of the private endpoint connection resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private PrivateEndpointConnectionProvisioningState provisioningState;
+
+ /**
+ * Get the privateEndpoint property: The resource of private end point.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint property: The resource of private end point.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the private endpoint connection resource.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpoint() != null) {
+ privateEndpoint().validate();
+ }
+ if (privateLinkServiceConnectionState() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property privateLinkServiceConnectionState in model"
+ + " PrivateEndpointConnectionProperties"));
+ } else {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class);
+}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/StatusResult.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/StatusResult.java
new file mode 100644
index 000000000000..4340c8226648
--- /dev/null
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/models/StatusResult.java
@@ -0,0 +1,120 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.attestation.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.attestation.models.AttestationServiceStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Status of attestation service. */
+@Fluent
+public final class StatusResult {
+ /*
+ * Trust model for the attestation provider.
+ */
+ @JsonProperty(value = "trustModel")
+ private String trustModel;
+
+ /*
+ * Status of attestation service.
+ */
+ @JsonProperty(value = "status")
+ private AttestationServiceStatus status;
+
+ /*
+ * Gets the uri of attestation service
+ */
+ @JsonProperty(value = "attestUri")
+ private String attestUri;
+
+ /*
+ * List of private endpoint connections associated with the attestation
+ * provider.
+ */
+ @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
+ private List privateEndpointConnections;
+
+ /**
+ * Get the trustModel property: Trust model for the attestation provider.
+ *
+ * @return the trustModel value.
+ */
+ public String trustModel() {
+ return this.trustModel;
+ }
+
+ /**
+ * Set the trustModel property: Trust model for the attestation provider.
+ *
+ * @param trustModel the trustModel value to set.
+ * @return the StatusResult object itself.
+ */
+ public StatusResult withTrustModel(String trustModel) {
+ this.trustModel = trustModel;
+ return this;
+ }
+
+ /**
+ * Get the status property: Status of attestation service.
+ *
+ * @return the status value.
+ */
+ public AttestationServiceStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Status of attestation service.
+ *
+ * @param status the status value to set.
+ * @return the StatusResult object itself.
+ */
+ public StatusResult withStatus(AttestationServiceStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the attestUri property: Gets the uri of attestation service.
+ *
+ * @return the attestUri value.
+ */
+ public String attestUri() {
+ return this.attestUri;
+ }
+
+ /**
+ * Set the attestUri property: Gets the uri of attestation service.
+ *
+ * @param attestUri the attestUri value to set.
+ * @return the StatusResult object itself.
+ */
+ public StatusResult withAttestUri(String attestUri) {
+ this.attestUri = attestUri;
+ return this;
+ }
+
+ /**
+ * Get the privateEndpointConnections property: List of private endpoint connections associated with the attestation
+ * provider.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpointConnections() != null) {
+ privateEndpointConnections().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/AttestationManagementClientImpl.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/AttestationManagementClientImpl.java
index 17d38574ea08..b5369db36c0d 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/AttestationManagementClientImpl.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/AttestationManagementClientImpl.java
@@ -38,8 +38,6 @@
/** Initializes a new instance of the AttestationManagementClientImpl type. */
@ServiceClient(builder = AttestationManagementClientBuilder.class)
public final class AttestationManagementClientImpl implements AttestationManagementClient {
- private final ClientLogger logger = new ClientLogger(AttestationManagementClientImpl.class);
-
/** The ID of the target subscription. */
private final String subscriptionId;
@@ -259,7 +257,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse,
managementError = null;
}
} catch (IOException | RuntimeException ioe) {
- logger.logThrowableAsWarning(ioe);
+ LOGGER.logThrowableAsWarning(ioe);
}
}
} else {
@@ -318,4 +316,6 @@ public Mono getBodyAsString(Charset charset) {
return Mono.just(new String(responseBody, charset));
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(AttestationManagementClientImpl.class);
}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/AttestationProvidersClientImpl.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/AttestationProvidersClientImpl.java
index a16367806af0..ffca2ffc111a 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/AttestationProvidersClientImpl.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/AttestationProvidersClientImpl.java
@@ -25,7 +25,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.attestation.fluent.AttestationProvidersClient;
import com.azure.resourcemanager.attestation.fluent.models.AttestationProviderInner;
import com.azure.resourcemanager.attestation.fluent.models.AttestationProviderListResultInner;
@@ -35,8 +34,6 @@
/** An instance of this class provides access to all the operations defined in AttestationProvidersClient. */
public final class AttestationProvidersClientImpl implements AttestationProvidersClient {
- private final ClientLogger logger = new ClientLogger(AttestationProvidersClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final AttestationProvidersService service;
@@ -181,7 +178,7 @@ Mono> getDefaultByLocation(
* @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 the status of Attestation Provider.
+ * @return the status of Attestation Provider along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -230,7 +227,7 @@ private Mono> getByResourceGroupWithResponseA
* @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 the status of Attestation Provider.
+ * @return the status of Attestation Provider along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -275,7 +272,7 @@ private Mono> getByResourceGroupWithResponseA
* @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 the status of Attestation Provider.
+ * @return the status of Attestation Provider on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByResourceGroupAsync(String resourceGroupName, String providerName) {
@@ -314,7 +311,7 @@ public AttestationProviderInner getByResourceGroup(String resourceGroupName, Str
* @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 the status of Attestation Provider.
+ * @return the status of Attestation Provider along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getByResourceGroupWithResponse(
@@ -331,7 +328,8 @@ public Response getByResourceGroupWithResponse(
* @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 attestation service response message.
+ * @return attestation service response message along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createWithResponseAsync(
@@ -387,7 +385,8 @@ private Mono> createWithResponseAsync(
* @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 attestation service response message.
+ * @return attestation service response message along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createWithResponseAsync(
@@ -442,7 +441,7 @@ private Mono> createWithResponseAsync(
* @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 attestation service response message.
+ * @return attestation service response message on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
@@ -485,7 +484,7 @@ public AttestationProviderInner create(
* @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 attestation service response message.
+ * @return attestation service response message along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response createWithResponse(
@@ -505,7 +504,8 @@ public Response createWithResponse(
* @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 attestation service response message.
+ * @return attestation service response message along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> updateWithResponseAsync(
@@ -561,7 +561,8 @@ private Mono> updateWithResponseAsync(
* @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 attestation service response message.
+ * @return attestation service response message along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> updateWithResponseAsync(
@@ -613,7 +614,7 @@ private Mono> updateWithResponseAsync(
* @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 attestation service response message.
+ * @return attestation service response message on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -656,7 +657,7 @@ public AttestationProviderInner update(
* @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 attestation service response message.
+ * @return attestation service response message along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response updateWithResponse(
@@ -672,7 +673,7 @@ public Response updateWithResponse(
* @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 the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(String resourceGroupName, String providerName) {
@@ -720,7 +721,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
* @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 the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(
@@ -765,7 +766,7 @@ private Mono> deleteWithResponseAsync(
* @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 the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String providerName) {
@@ -795,7 +796,7 @@ public void delete(String resourceGroupName, String providerName) {
* @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 the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response deleteWithResponse(String resourceGroupName, String providerName, Context context) {
@@ -807,7 +808,7 @@ public Response deleteWithResponse(String resourceGroupName, String provid
*
* @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 attestation Providers List.
+ * @return attestation Providers List along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listWithResponseAsync() {
@@ -844,7 +845,7 @@ private Mono> listWithResponseAsync
* @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 attestation Providers List.
+ * @return attestation Providers List along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listWithResponseAsync(Context context) {
@@ -876,7 +877,7 @@ private Mono> listWithResponseAsync
*
* @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 attestation Providers List.
+ * @return attestation Providers List on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono listAsync() {
@@ -910,7 +911,7 @@ public AttestationProviderListResultInner list() {
* @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 attestation Providers List.
+ * @return attestation Providers List along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response listWithResponse(Context context) {
@@ -924,7 +925,7 @@ public Response listWithResponse(Context con
* @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 attestation Providers List.
+ * @return attestation Providers List along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupWithResponseAsync(
@@ -968,7 +969,7 @@ private Mono> listByResourceGroupWi
* @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 attestation Providers List.
+ * @return attestation Providers List along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupWithResponseAsync(
@@ -1008,7 +1009,7 @@ private Mono> listByResourceGroupWi
* @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 attestation Providers List.
+ * @return attestation Providers List on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono listByResourceGroupAsync(String resourceGroupName) {
@@ -1045,7 +1046,7 @@ public AttestationProviderListResultInner listByResourceGroup(String resourceGro
* @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 attestation Providers List.
+ * @return attestation Providers List along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response listByResourceGroupWithResponse(
@@ -1058,7 +1059,7 @@ public Response listByResourceGroupWithRespo
*
* @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 the default provider.
+ * @return the default provider along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listDefaultWithResponseAsync() {
@@ -1095,7 +1096,7 @@ private Mono> listDefaultWithRespon
* @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 the default provider.
+ * @return the default provider along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listDefaultWithResponseAsync(Context context) {
@@ -1127,7 +1128,7 @@ private Mono> listDefaultWithRespon
*
* @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 the default provider.
+ * @return the default provider on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono listDefaultAsync() {
@@ -1161,7 +1162,7 @@ public AttestationProviderListResultInner listDefault() {
* @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 the default provider.
+ * @return the default provider along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response listDefaultWithResponse(Context context) {
@@ -1175,7 +1176,7 @@ public Response listDefaultWithResponse(Cont
* @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 the default provider by location.
+ * @return the default provider by location along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getDefaultByLocationWithResponseAsync(String location) {
@@ -1217,7 +1218,7 @@ private Mono> getDefaultByLocationWithRespons
* @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 the default provider by location.
+ * @return the default provider by location along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getDefaultByLocationWithResponseAsync(
@@ -1256,7 +1257,7 @@ private Mono> getDefaultByLocationWithRespons
* @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 the default provider by location.
+ * @return the default provider by location on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getDefaultByLocationAsync(String location) {
@@ -1293,7 +1294,7 @@ public AttestationProviderInner getDefaultByLocation(String location) {
* @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 the default provider by location.
+ * @return the default provider by location along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getDefaultByLocationWithResponse(String location, Context context) {
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/AttestationProvidersImpl.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/AttestationProvidersImpl.java
index 296a6081e270..7747c53e271e 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/AttestationProvidersImpl.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/AttestationProvidersImpl.java
@@ -14,10 +14,9 @@
import com.azure.resourcemanager.attestation.models.AttestationProvider;
import com.azure.resourcemanager.attestation.models.AttestationProviderListResult;
import com.azure.resourcemanager.attestation.models.AttestationProviders;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class AttestationProvidersImpl implements AttestationProviders {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AttestationProvidersImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(AttestationProvidersImpl.class);
private final AttestationProvidersClient innerClient;
@@ -156,7 +155,7 @@ public Response getDefaultByLocationWithResponse(String loc
public AttestationProvider getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -164,7 +163,7 @@ public AttestationProvider getById(String id) {
}
String providerName = Utils.getValueFromIdByName(id, "attestationProviders");
if (providerName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -178,7 +177,7 @@ public AttestationProvider getById(String id) {
public Response getByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -186,7 +185,7 @@ public Response getByIdWithResponse(String id, Context cont
}
String providerName = Utils.getValueFromIdByName(id, "attestationProviders");
if (providerName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -200,7 +199,7 @@ public Response getByIdWithResponse(String id, Context cont
public void deleteById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -208,7 +207,7 @@ public void deleteById(String id) {
}
String providerName = Utils.getValueFromIdByName(id, "attestationProviders");
if (providerName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -216,13 +215,13 @@ public void deleteById(String id) {
"The resource ID '%s' is not valid. Missing path segment 'attestationProviders'.",
id)));
}
- this.deleteWithResponse(resourceGroupName, providerName, Context.NONE).getValue();
+ this.deleteWithResponse(resourceGroupName, providerName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -230,7 +229,7 @@ public Response deleteByIdWithResponse(String id, Context context) {
}
String providerName = Utils.getValueFromIdByName(id, "attestationProviders");
if (providerName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/OperationsClientImpl.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/OperationsClientImpl.java
index 4072b351da1b..ebc31aa79db8 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/OperationsClientImpl.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/OperationsClientImpl.java
@@ -20,15 +20,12 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.attestation.fluent.OperationsClient;
import com.azure.resourcemanager.attestation.fluent.models.OperationListInner;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in OperationsClient. */
public final class OperationsClientImpl implements OperationsClient {
- private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final OperationsService service;
@@ -69,7 +66,7 @@ Mono> list(
*
* @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 list of supported operations.
+ * @return list of supported operations along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listWithResponseAsync() {
@@ -93,7 +90,7 @@ private Mono> listWithResponseAsync() {
* @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 list of supported operations.
+ * @return list of supported operations along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listWithResponseAsync(Context context) {
@@ -113,7 +110,7 @@ private Mono> listWithResponseAsync(Context context
*
* @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 list of supported operations.
+ * @return list of supported operations on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono listAsync() {
@@ -147,7 +144,7 @@ public OperationListInner list() {
* @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 list of supported operations.
+ * @return list of supported operations along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response listWithResponse(Context context) {
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/OperationsImpl.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/OperationsImpl.java
index d464e4b5c99b..d8aa9069441b 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/OperationsImpl.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/OperationsImpl.java
@@ -12,10 +12,9 @@
import com.azure.resourcemanager.attestation.fluent.models.OperationListInner;
import com.azure.resourcemanager.attestation.models.OperationList;
import com.azure.resourcemanager.attestation.models.Operations;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class OperationsImpl implements Operations {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class);
private final OperationsClient innerClient;
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/PrivateEndpointConnectionsClientImpl.java
index 62477efb2d54..1627239670a2 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/PrivateEndpointConnectionsClientImpl.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/PrivateEndpointConnectionsClientImpl.java
@@ -28,7 +28,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.attestation.fluent.PrivateEndpointConnectionsClient;
import com.azure.resourcemanager.attestation.fluent.models.PrivateEndpointConnectionInner;
import com.azure.resourcemanager.attestation.models.PrivateEndpointConnectionListResult;
@@ -36,8 +35,6 @@
/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */
public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient {
- private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final PrivateEndpointConnectionsService service;
@@ -67,7 +64,7 @@ private interface PrivateEndpointConnectionsService {
@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation"
- + "/attestationProvider/{providerName}/privateEndpointConnections")
+ + "/attestationProviders/{providerName}/privateEndpointConnections")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> list(
@@ -137,7 +134,8 @@ Mono> delete(
* @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 list of private endpoint connection associated with the specified storage account.
+ * @return list of private endpoint connection associated with the specified storage account along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(
@@ -190,7 +188,8 @@ private Mono> listSinglePageAsync(
* @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 list of private endpoint connection associated with the specified storage account.
+ * @return list of private endpoint connection associated with the specified storage account along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(
@@ -239,7 +238,8 @@ private Mono> listSinglePageAsync(
* @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 list of private endpoint connection associated with the specified storage account.
+ * @return list of private endpoint connection associated with the specified storage account as paginated response
+ * with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String resourceGroupName, String providerName) {
@@ -255,7 +255,8 @@ private PagedFlux listAsync(String resourceGroup
* @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 list of private endpoint connection associated with the specified storage account.
+ * @return list of private endpoint connection associated with the specified storage account as paginated response
+ * with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(
@@ -271,7 +272,8 @@ private PagedFlux listAsync(
* @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 list of private endpoint connection associated with the specified storage account.
+ * @return list of private endpoint connection associated with the specified storage account as paginated response
+ * with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String resourceGroupName, String providerName) {
@@ -287,7 +289,8 @@ public PagedIterable list(String resourceGroupNa
* @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 list of private endpoint connection associated with the specified storage account.
+ * @return list of private endpoint connection associated with the specified storage account as paginated response
+ * with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(
@@ -305,7 +308,8 @@ public PagedIterable list(
* @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 the specified private endpoint connection associated with the attestation provider.
+ * @return the specified private endpoint connection associated with the attestation provider along with {@link
+ * Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(
@@ -363,7 +367,8 @@ private Mono> getWithResponseAsync(
* @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 the specified private endpoint connection associated with the attestation provider.
+ * @return the specified private endpoint connection associated with the attestation provider along with {@link
+ * Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(
@@ -417,7 +422,8 @@ private Mono> getWithResponseAsync(
* @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 the specified private endpoint connection associated with the attestation provider.
+ * @return the specified private endpoint connection associated with the attestation provider on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(
@@ -462,7 +468,8 @@ public PrivateEndpointConnectionInner get(
* @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 the specified private endpoint connection associated with the attestation provider.
+ * @return the specified private endpoint connection associated with the attestation provider along with {@link
+ * Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(
@@ -481,7 +488,8 @@ public Response getWithResponse(
* @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 the Private Endpoint Connection resource.
+ * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createWithResponseAsync(
@@ -549,7 +557,8 @@ private Mono> createWithResponseAsync(
* @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 the Private Endpoint Connection resource.
+ * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createWithResponseAsync(
@@ -614,7 +623,7 @@ private Mono> createWithResponseAsync(
* @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 the Private Endpoint Connection resource.
+ * @return the Private Endpoint Connection resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
@@ -667,7 +676,7 @@ public PrivateEndpointConnectionInner create(
* @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 the Private Endpoint Connection resource.
+ * @return the Private Endpoint Connection resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response createWithResponse(
@@ -691,7 +700,7 @@ public Response createWithResponse(
* @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 the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(
@@ -749,7 +758,7 @@ private Mono> deleteWithResponseAsync(
* @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 the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(
@@ -803,7 +812,7 @@ private Mono> deleteWithResponseAsync(
* @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 the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(
@@ -839,7 +848,7 @@ public void delete(String resourceGroupName, String providerName, String private
* @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 the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response deleteWithResponse(
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/PrivateEndpointConnectionsImpl.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/PrivateEndpointConnectionsImpl.java
index 0748b7ce8c29..0095a9622369 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/PrivateEndpointConnectionsImpl.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/implementation/PrivateEndpointConnectionsImpl.java
@@ -13,10 +13,9 @@
import com.azure.resourcemanager.attestation.fluent.models.PrivateEndpointConnectionInner;
import com.azure.resourcemanager.attestation.models.PrivateEndpointConnection;
import com.azure.resourcemanager.attestation.models.PrivateEndpointConnections;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class);
private final PrivateEndpointConnectionsClient innerClient;
@@ -84,7 +83,7 @@ public Response deleteWithResponse(
public PrivateEndpointConnection getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -92,7 +91,7 @@ public PrivateEndpointConnection getById(String id) {
}
String providerName = Utils.getValueFromIdByName(id, "attestationProviders");
if (providerName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -102,7 +101,7 @@ public PrivateEndpointConnection getById(String id) {
}
String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections");
if (privateEndpointConnectionName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -118,7 +117,7 @@ public PrivateEndpointConnection getById(String id) {
public Response getByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -126,7 +125,7 @@ public Response getByIdWithResponse(String id, Contex
}
String providerName = Utils.getValueFromIdByName(id, "attestationProviders");
if (providerName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -136,7 +135,7 @@ public Response getByIdWithResponse(String id, Contex
}
String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections");
if (privateEndpointConnectionName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -150,7 +149,7 @@ public Response getByIdWithResponse(String id, Contex
public void deleteById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -158,7 +157,7 @@ public void deleteById(String id) {
}
String providerName = Utils.getValueFromIdByName(id, "attestationProviders");
if (providerName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -168,7 +167,7 @@ public void deleteById(String id) {
}
String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections");
if (privateEndpointConnectionName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -176,15 +175,13 @@ public void deleteById(String id) {
"The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
id)));
}
- this
- .deleteWithResponse(resourceGroupName, providerName, privateEndpointConnectionName, Context.NONE)
- .getValue();
+ this.deleteWithResponse(resourceGroupName, providerName, privateEndpointConnectionName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -192,7 +189,7 @@ public Response deleteByIdWithResponse(String id, Context context) {
}
String providerName = Utils.getValueFromIdByName(id, "attestationProviders");
if (providerName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -202,7 +199,7 @@ public Response deleteByIdWithResponse(String id, Context context) {
}
String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections");
if (privateEndpointConnectionName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationProviders.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationProviders.java
index 75fabb8eeb84..6be1549d3307 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationProviders.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationProviders.java
@@ -30,7 +30,7 @@ public interface AttestationProviders {
* @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 the status of Attestation Provider.
+ * @return the status of Attestation Provider along with {@link Response}.
*/
Response getByResourceGroupWithResponse(
String resourceGroupName, String providerName, Context context);
@@ -55,7 +55,7 @@ Response getByResourceGroupWithResponse(
* @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 the response.
+ * @return the {@link Response}.
*/
Response deleteWithResponse(String resourceGroupName, String providerName, Context context);
@@ -75,7 +75,7 @@ Response getByResourceGroupWithResponse(
* @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 attestation Providers List.
+ * @return attestation Providers List along with {@link Response}.
*/
Response listWithResponse(Context context);
@@ -98,7 +98,7 @@ Response getByResourceGroupWithResponse(
* @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 attestation Providers List.
+ * @return attestation Providers List along with {@link Response}.
*/
Response listByResourceGroupWithResponse(String resourceGroupName, Context context);
@@ -118,7 +118,7 @@ Response getByResourceGroupWithResponse(
* @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 the default provider.
+ * @return the default provider along with {@link Response}.
*/
Response listDefaultWithResponse(Context context);
@@ -141,7 +141,7 @@ Response getByResourceGroupWithResponse(
* @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 the default provider by location.
+ * @return the default provider by location along with {@link Response}.
*/
Response getDefaultByLocationWithResponse(String location, Context context);
@@ -152,7 +152,7 @@ Response getByResourceGroupWithResponse(
* @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 the status of Attestation Provider.
+ * @return the status of Attestation Provider along with {@link Response}.
*/
AttestationProvider getById(String id);
@@ -164,7 +164,7 @@ Response getByResourceGroupWithResponse(
* @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 the status of Attestation Provider.
+ * @return the status of Attestation Provider along with {@link Response}.
*/
Response getByIdWithResponse(String id, Context context);
@@ -186,7 +186,7 @@ Response getByResourceGroupWithResponse(
* @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 the response.
+ * @return the {@link Response}.
*/
Response deleteByIdWithResponse(String id, Context context);
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationServiceCreationParams.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationServiceCreationParams.java
index fd91e599f046..608720ffa5bb 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationServiceCreationParams.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationServiceCreationParams.java
@@ -6,15 +6,13 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** Parameters for creating an attestation provider. */
@Fluent
public final class AttestationServiceCreationParams {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AttestationServiceCreationParams.class);
-
/*
* The supported Azure location where the attestation provider should be
* created.
@@ -26,6 +24,7 @@ public final class AttestationServiceCreationParams {
* The tags that will be assigned to the attestation provider.
*/
@JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
/*
@@ -101,13 +100,13 @@ public AttestationServiceCreationParams withProperties(AttestationServiceCreatio
*/
public void validate() {
if (location() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property location in model AttestationServiceCreationParams"));
}
if (properties() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property properties in model AttestationServiceCreationParams"));
@@ -115,4 +114,6 @@ public void validate() {
properties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(AttestationServiceCreationParams.class);
}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationServiceCreationSpecificParams.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationServiceCreationSpecificParams.java
index 8c63c1638db9..64cf95264e39 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationServiceCreationSpecificParams.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationServiceCreationSpecificParams.java
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.attestation.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;
/** Client supplied parameters used to create a new attestation provider. */
@Fluent
public final class AttestationServiceCreationSpecificParams {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AttestationServiceCreationSpecificParams.class);
-
/*
* JSON Web Key Set defining a set of X.509 Certificates that will
* represent the parent certificate for the signing certificate used for
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationServicePatchParams.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationServicePatchParams.java
index 795855e5dc6b..d9c1ed04ba40 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationServicePatchParams.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationServicePatchParams.java
@@ -5,20 +5,18 @@
package com.azure.resourcemanager.attestation.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.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** Parameters for patching an attestation provider. */
@Fluent
public final class AttestationServicePatchParams {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AttestationServicePatchParams.class);
-
/*
* The tags that will be assigned to the attestation provider.
*/
@JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
/**
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/JsonWebKey.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/JsonWebKey.java
index 98fcf13d3cb0..8aef9994db69 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/JsonWebKey.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/JsonWebKey.java
@@ -6,15 +6,12 @@
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 JsonWebKey model. */
@Fluent
public final class JsonWebKey {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(JsonWebKey.class);
-
/*
* The "alg" (algorithm) parameter identifies the algorithm intended for
* use with the key. The values used should either be registered in the
@@ -519,8 +516,10 @@ public JsonWebKey withY(String y) {
*/
public void validate() {
if (kty() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(new IllegalArgumentException("Missing required property kty in model JsonWebKey"));
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(JsonWebKey.class);
}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/JsonWebKeySet.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/JsonWebKeySet.java
index be3cf7a35945..f45a797e6363 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/JsonWebKeySet.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/JsonWebKeySet.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.attestation.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 JsonWebKeySet model. */
@Fluent
public final class JsonWebKeySet {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(JsonWebKeySet.class);
-
/*
* The value of the "keys" parameter is an array of JWK values. By
* default, the order of the JWK values within the array does not imply
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/Operations.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/Operations.java
index 9d0f32b868ae..adf056a2b911 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/Operations.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/Operations.java
@@ -25,7 +25,7 @@ public interface Operations {
* @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 list of supported operations.
+ * @return list of supported operations along with {@link Response}.
*/
Response listWithResponse(Context context);
}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/OperationsDefinition.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/OperationsDefinition.java
index f28d9928e453..36402ae7e944 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/OperationsDefinition.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/OperationsDefinition.java
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.attestation.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;
/** Definition object with the name and properties of an operation. */
@Fluent
public final class OperationsDefinition {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsDefinition.class);
-
/*
* Name of the operation.
*/
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/OperationsDisplayDefinition.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/OperationsDisplayDefinition.java
index 4089d7bba14a..7bf3aec57fe8 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/OperationsDisplayDefinition.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/OperationsDisplayDefinition.java
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.attestation.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;
/** Display object with properties of the operation. */
@Fluent
public final class OperationsDisplayDefinition {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsDisplayDefinition.class);
-
/*
* Resource provider of the operation.
*/
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/PrivateEndpoint.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/PrivateEndpoint.java
index 2940c083e936..2d81c244dd9d 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/PrivateEndpoint.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/PrivateEndpoint.java
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.attestation.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The Private Endpoint resource. */
@Immutable
public final class PrivateEndpoint {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpoint.class);
-
/*
* The ARM identifier for Private Endpoint
*/
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/PrivateEndpointConnectionListResult.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/PrivateEndpointConnectionListResult.java
index f06ae82fd379..24d7f5dd22fc 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/PrivateEndpointConnectionListResult.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/PrivateEndpointConnectionListResult.java
@@ -5,17 +5,13 @@
package com.azure.resourcemanager.attestation.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.attestation.fluent.models.PrivateEndpointConnectionInner;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** List of private endpoint connection associated with the specified storage account. */
@Fluent
public final class PrivateEndpointConnectionListResult {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionListResult.class);
-
/*
* Array of private endpoint connections
*/
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/PrivateEndpointConnections.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/PrivateEndpointConnections.java
index f195e71ee0e4..c48bf10886b4 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/PrivateEndpointConnections.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/PrivateEndpointConnections.java
@@ -18,7 +18,8 @@ public interface PrivateEndpointConnections {
* @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 list of private endpoint connection associated with the specified storage account.
+ * @return list of private endpoint connection associated with the specified storage account as paginated response
+ * with {@link PagedIterable}.
*/
PagedIterable list(String resourceGroupName, String providerName);
@@ -31,7 +32,8 @@ public interface PrivateEndpointConnections {
* @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 list of private endpoint connection associated with the specified storage account.
+ * @return list of private endpoint connection associated with the specified storage account as paginated response
+ * with {@link PagedIterable}.
*/
PagedIterable list(String resourceGroupName, String providerName, Context context);
@@ -60,7 +62,8 @@ public interface PrivateEndpointConnections {
* @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 the specified private endpoint connection associated with the attestation provider.
+ * @return the specified private endpoint connection associated with the attestation provider along with {@link
+ * Response}.
*/
Response getWithResponse(
String resourceGroupName, String providerName, String privateEndpointConnectionName, Context context);
@@ -89,7 +92,7 @@ Response getWithResponse(
* @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 the response.
+ * @return the {@link Response}.
*/
Response deleteWithResponse(
String resourceGroupName, String providerName, String privateEndpointConnectionName, Context context);
@@ -101,7 +104,8 @@ Response deleteWithResponse(
* @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 the specified private endpoint connection associated with the attestation provider.
+ * @return the specified private endpoint connection associated with the attestation provider along with {@link
+ * Response}.
*/
PrivateEndpointConnection getById(String id);
@@ -113,7 +117,8 @@ Response deleteWithResponse(
* @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 the specified private endpoint connection associated with the attestation provider.
+ * @return the specified private endpoint connection associated with the attestation provider along with {@link
+ * Response}.
*/
Response getByIdWithResponse(String id, Context context);
@@ -135,7 +140,7 @@ Response deleteWithResponse(
* @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 the response.
+ * @return the {@link Response}.
*/
Response deleteByIdWithResponse(String id, Context context);
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/PrivateLinkServiceConnectionState.java b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/PrivateLinkServiceConnectionState.java
index 968853517ccf..e76e01c7018f 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/PrivateLinkServiceConnectionState.java
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/PrivateLinkServiceConnectionState.java
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.attestation.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;
/** A collection of information about the state of the connection between service consumer and provider. */
@Fluent
public final class PrivateLinkServiceConnectionState {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkServiceConnectionState.class);
-
/*
* Indicates whether the connection has been Approved/Rejected/Removed by
* the owner of the service.
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersCreateSamples.java b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersCreateSamples.java
new file mode 100644
index 000000000000..063288ace20b
--- /dev/null
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersCreateSamples.java
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.attestation.generated;
+
+import com.azure.resourcemanager.attestation.models.AttestationServiceCreationSpecificParams;
+
+/** Samples for AttestationProviders Create. */
+public final class AttestationProvidersCreateSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Create_AttestationProvider.json
+ */
+ /**
+ * Sample code: AttestationProviders_Create.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProvidersCreate(com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager
+ .attestationProviders()
+ .define("myattestationprovider")
+ .withRegion((String) null)
+ .withExistingResourceGroup("MyResourceGroup")
+ .withProperties((AttestationServiceCreationSpecificParams) null)
+ .create();
+ }
+}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersDeleteSamples.java b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersDeleteSamples.java
new file mode 100644
index 000000000000..89731dbb5e3a
--- /dev/null
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersDeleteSamples.java
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.attestation.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for AttestationProviders Delete. */
+public final class AttestationProvidersDeleteSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Delete_AttestationProvider.json
+ */
+ /**
+ * Sample code: AttestationProviders_Delete.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProvidersDelete(com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager
+ .attestationProviders()
+ .deleteWithResponse("sample-resource-group", "myattestationprovider", Context.NONE);
+ }
+}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersGetByResourceGroupSamples.java b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersGetByResourceGroupSamples.java
new file mode 100644
index 000000000000..5738aaea97f3
--- /dev/null
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersGetByResourceGroupSamples.java
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.attestation.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for AttestationProviders GetByResourceGroup. */
+public final class AttestationProvidersGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Get_AttestationProvider.json
+ */
+ /**
+ * Sample code: AttestationProviders_Get.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProvidersGet(com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager
+ .attestationProviders()
+ .getByResourceGroupWithResponse("MyResourceGroup", "myattestationprovider", Context.NONE);
+ }
+}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersGetDefaultByLocationSamples.java b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersGetDefaultByLocationSamples.java
new file mode 100644
index 000000000000..cf04aea65950
--- /dev/null
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersGetDefaultByLocationSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.attestation.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for AttestationProviders GetDefaultByLocation. */
+public final class AttestationProvidersGetDefaultByLocationSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Get_DefaultProviderByLocation.json
+ */
+ /**
+ * Sample code: AttestationProviders_GetDefaultWithLocation.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProvidersGetDefaultWithLocation(
+ com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager.attestationProviders().getDefaultByLocationWithResponse("Central US", Context.NONE);
+ }
+}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersListByResourceGroupSamples.java b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersListByResourceGroupSamples.java
new file mode 100644
index 000000000000..6a0202961347
--- /dev/null
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersListByResourceGroupSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.attestation.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for AttestationProviders ListByResourceGroup. */
+public final class AttestationProvidersListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Get_AttestationProvidersListByResourceGroup.json
+ */
+ /**
+ * Sample code: AttestationProviders_ListByResourceGroup.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProvidersListByResourceGroup(
+ com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager.attestationProviders().listByResourceGroupWithResponse("testrg1", Context.NONE);
+ }
+}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersListDefaultSamples.java b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersListDefaultSamples.java
new file mode 100644
index 000000000000..6bf5bc058721
--- /dev/null
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersListDefaultSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.attestation.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for AttestationProviders ListDefault. */
+public final class AttestationProvidersListDefaultSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Get_DefaultProviders.json
+ */
+ /**
+ * Sample code: AttestationProviders_GetDefault.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProvidersGetDefault(
+ com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager.attestationProviders().listDefaultWithResponse(Context.NONE);
+ }
+}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersListSamples.java b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersListSamples.java
new file mode 100644
index 000000000000..2c50e2b5175b
--- /dev/null
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.attestation.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for AttestationProviders List. */
+public final class AttestationProvidersListSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Get_AttestationProvidersList.json
+ */
+ /**
+ * Sample code: AttestationProviders_List.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProvidersList(com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager.attestationProviders().listWithResponse(Context.NONE);
+ }
+}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersUpdateSamples.java b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersUpdateSamples.java
new file mode 100644
index 000000000000..802ec8f5effb
--- /dev/null
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/AttestationProvidersUpdateSamples.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.attestation.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.attestation.models.AttestationProvider;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for AttestationProviders Update. */
+public final class AttestationProvidersUpdateSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Update_AttestationProvider.json
+ */
+ /**
+ * Sample code: AttestationProviders_Update.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProvidersUpdate(com.azure.resourcemanager.attestation.AttestationManager manager) {
+ AttestationProvider resource =
+ manager
+ .attestationProviders()
+ .getByResourceGroupWithResponse("MyResourceGroup", "myattestationprovider", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("Property1", "Value1", "Property2", "Value2", "Property3", "Value3")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/OperationsListSamples.java b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/OperationsListSamples.java
new file mode 100644
index 000000000000..0c6ed98886f7
--- /dev/null
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/OperationsListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.attestation.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/Operations_List.json
+ */
+ /**
+ * Sample code: Operations_List.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void operationsList(com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager.operations().listWithResponse(Context.NONE);
+ }
+}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/PrivateEndpointConnectionsCreateSamples.java b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/PrivateEndpointConnectionsCreateSamples.java
new file mode 100644
index 000000000000..5fdf557d3eca
--- /dev/null
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/PrivateEndpointConnectionsCreateSamples.java
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.attestation.generated;
+
+import com.azure.resourcemanager.attestation.models.PrivateEndpointServiceConnectionStatus;
+import com.azure.resourcemanager.attestation.models.PrivateLinkServiceConnectionState;
+
+/** Samples for PrivateEndpointConnections Create. */
+public final class PrivateEndpointConnectionsCreateSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/AttestationProviderPutPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: AttestationProviderPutPrivateEndpointConnection.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProviderPutPrivateEndpointConnection(
+ com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager
+ .privateEndpointConnections()
+ .define("{privateEndpointConnectionName}")
+ .withExistingAttestationProvider("res7687", "sto9699")
+ .withPrivateLinkServiceConnectionState(
+ new PrivateLinkServiceConnectionState()
+ .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)
+ .withDescription("Auto-Approved"))
+ .create();
+ }
+}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/PrivateEndpointConnectionsDeleteSamples.java
new file mode 100644
index 000000000000..c713ab7df2e4
--- /dev/null
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/PrivateEndpointConnectionsDeleteSamples.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.attestation.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Delete. */
+public final class PrivateEndpointConnectionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/AttestationProviderDeletePrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: AttestationProviderDeletePrivateEndpointConnection.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProviderDeletePrivateEndpointConnection(
+ com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager
+ .privateEndpointConnections()
+ .deleteWithResponse("res6977", "sto2527", "{privateEndpointConnectionName}", Context.NONE);
+ }
+}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/PrivateEndpointConnectionsGetSamples.java
new file mode 100644
index 000000000000..03f65bf09d6d
--- /dev/null
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/PrivateEndpointConnectionsGetSamples.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.attestation.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Get. */
+public final class PrivateEndpointConnectionsGetSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/AttestationProviderGetPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: AttestationProviderGetPrivateEndpointConnection.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProviderGetPrivateEndpointConnection(
+ com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager
+ .privateEndpointConnections()
+ .getWithResponse("res6977", "sto2527", "{privateEndpointConnectionName}", Context.NONE);
+ }
+}
diff --git a/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/PrivateEndpointConnectionsListSamples.java b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/PrivateEndpointConnectionsListSamples.java
new file mode 100644
index 000000000000..009afdfbb70e
--- /dev/null
+++ b/sdk/attestation/azure-resourcemanager-attestation/src/samples/java/com/azure/resourcemanager/attestation/generated/PrivateEndpointConnectionsListSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.attestation.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections List. */
+public final class PrivateEndpointConnectionsListSamples {
+ /*
+ * x-ms-original-file: specification/attestation/resource-manager/Microsoft.Attestation/stable/2020-10-01/examples/AttestationProviderListPrivateEndpointConnections.json
+ */
+ /**
+ * Sample code: AttestationProviderListPrivateEndpointConnections.
+ *
+ * @param manager Entry point to AttestationManager.
+ */
+ public static void attestationProviderListPrivateEndpointConnections(
+ com.azure.resourcemanager.attestation.AttestationManager manager) {
+ manager.privateEndpointConnections().list("res6977", "sto2527", Context.NONE);
+ }
+}