diff --git a/sdk/labservices/azure-resourcemanager-labservices/CHANGELOG.md b/sdk/labservices/azure-resourcemanager-labservices/CHANGELOG.md index c39334fd45b9..f3b22bc890c1 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/CHANGELOG.md +++ b/sdk/labservices/azure-resourcemanager-labservices/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2022-05-16) + +- Azure Resource Manager LabServices client library for Java. This package contains Microsoft Azure SDK for LabServices Management SDK. REST API for managing Azure Lab Services images. Package tag package-preview-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/labservices/azure-resourcemanager-labservices/README.md b/sdk/labservices/azure-resourcemanager-labservices/README.md index 54e4970422aa..33b11ac9cca5 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/README.md +++ b/sdk/labservices/azure-resourcemanager-labservices/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-labservices - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/LabServicesManager.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/LabServicesManager.java index 6af095b4b54d..10a3265c3f49 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/LabServicesManager.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/LabServicesManager.java @@ -10,11 +10,13 @@ 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.AddHeadersFromContextPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; @@ -99,6 +101,19 @@ public static LabServicesManager authenticate(TokenCredential credential, AzureP return configure().authenticate(credential, profile); } + /** + * Creates an instance of LabServices service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the LabServices service API instance. + */ + public static LabServicesManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new LabServicesManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create LabServicesManager with optional configuration. * @@ -110,13 +125,14 @@ 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 RetryOptions retryOptions; private Duration defaultPollInterval; private Configurable() { @@ -177,6 +193,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { return this; } + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + /** * Sets the default poll interval, used when service does not provide "Retry-After" header. * @@ -184,9 +213,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; } @@ -208,7 +239,7 @@ public LabServicesManager authenticate(TokenCredential credential, AzureProfile .append("-") .append("com.azure.resourcemanager.labservices") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -226,10 +257,15 @@ public LabServicesManager authenticate(TokenCredential credential, AzureProfile scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); } if (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); policies .addAll( @@ -260,7 +296,11 @@ public LabServicesManager authenticate(TokenCredential credential, AzureProfile } } - /** @return Resource collection API of Images. */ + /** + * Gets the resource collection API of Images. It manages Image. + * + * @return Resource collection API of Images. + */ public Images images() { if (this.images == null) { this.images = new ImagesImpl(clientObject.getImages(), this); @@ -268,7 +308,11 @@ public Images images() { return images; } - /** @return Resource collection API of LabPlans. */ + /** + * Gets the resource collection API of LabPlans. It manages LabPlan. + * + * @return Resource collection API of LabPlans. + */ public LabPlans labPlans() { if (this.labPlans == null) { this.labPlans = new LabPlansImpl(clientObject.getLabPlans(), this); @@ -276,7 +320,11 @@ public LabPlans labPlans() { return labPlans; } - /** @return Resource collection API of Operations. */ + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ public Operations operations() { if (this.operations == null) { this.operations = new OperationsImpl(clientObject.getOperations(), this); @@ -284,7 +332,11 @@ public Operations operations() { return operations; } - /** @return Resource collection API of Labs. */ + /** + * Gets the resource collection API of Labs. It manages Lab. + * + * @return Resource collection API of Labs. + */ public Labs labs() { if (this.labs == null) { this.labs = new LabsImpl(clientObject.getLabs(), this); @@ -292,7 +344,11 @@ public Labs labs() { return labs; } - /** @return Resource collection API of OperationResults. */ + /** + * Gets the resource collection API of OperationResults. + * + * @return Resource collection API of OperationResults. + */ public OperationResults operationResults() { if (this.operationResults == null) { this.operationResults = new OperationResultsImpl(clientObject.getOperationResults(), this); @@ -300,7 +356,11 @@ public OperationResults operationResults() { return operationResults; } - /** @return Resource collection API of Schedules. */ + /** + * Gets the resource collection API of Schedules. It manages Schedule. + * + * @return Resource collection API of Schedules. + */ public Schedules schedules() { if (this.schedules == null) { this.schedules = new SchedulesImpl(clientObject.getSchedules(), this); @@ -308,7 +368,11 @@ public Schedules schedules() { return schedules; } - /** @return Resource collection API of Users. */ + /** + * Gets the resource collection API of Users. It manages User. + * + * @return Resource collection API of Users. + */ public Users users() { if (this.users == null) { this.users = new UsersImpl(clientObject.getUsers(), this); @@ -316,7 +380,11 @@ public Users users() { return users; } - /** @return Resource collection API of VirtualMachines. */ + /** + * Gets the resource collection API of VirtualMachines. + * + * @return Resource collection API of VirtualMachines. + */ public VirtualMachines virtualMachines() { if (this.virtualMachines == null) { this.virtualMachines = new VirtualMachinesImpl(clientObject.getVirtualMachines(), this); @@ -324,7 +392,11 @@ public VirtualMachines virtualMachines() { return virtualMachines; } - /** @return Resource collection API of Usages. */ + /** + * Gets the resource collection API of Usages. + * + * @return Resource collection API of Usages. + */ public Usages usages() { if (this.usages == null) { this.usages = new UsagesImpl(clientObject.getUsages(), this); @@ -332,7 +404,11 @@ public Usages usages() { return usages; } - /** @return Resource collection API of Skus. */ + /** + * Gets the resource collection API of Skus. + * + * @return Resource collection API of Skus. + */ public Skus skus() { if (this.skus == null) { this.skus = new SkusImpl(clientObject.getSkus(), this); diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/ImagesClient.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/ImagesClient.java index d1a0b69aefd0..461d93a4a49a 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/ImagesClient.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/ImagesClient.java @@ -23,7 +23,7 @@ public interface ImagesClient { * @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 all images from galleries attached to a lab plan. + * @return all images from galleries attached to a lab plan as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByLabPlan(String resourceGroupName, String labPlanName); @@ -39,7 +39,7 @@ public interface ImagesClient { * @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 all images from galleries attached to a lab plan. + * @return all images from galleries attached to a lab plan as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByLabPlan( diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/LabPlansClient.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/LabPlansClient.java index 885d63019a2a..13a73007fe55 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/LabPlansClient.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/LabPlansClient.java @@ -14,7 +14,6 @@ import com.azure.resourcemanager.labservices.fluent.models.LabPlanInner; import com.azure.resourcemanager.labservices.models.LabPlanUpdate; import com.azure.resourcemanager.labservices.models.SaveImageBody; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in LabPlansClient. */ public interface LabPlansClient { @@ -23,7 +22,7 @@ public interface LabPlansClient { * * @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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -36,7 +35,7 @@ public interface LabPlansClient { * @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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String filter, Context context); @@ -48,7 +47,7 @@ public interface LabPlansClient { * @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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -61,7 +60,7 @@ public interface LabPlansClient { * @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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -106,8 +105,8 @@ 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 lab Plans act as a permission container for creating labs via labs.azure.com along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of lab Plans act as a permission container for creating labs via + * labs.azure.com. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LabPlanInner> beginCreateOrUpdate( @@ -124,8 +123,8 @@ SyncPoller, LabPlanInner> beginCreateOrUpdate( * @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 lab Plans act as a permission container for creating labs via labs.azure.com along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of lab Plans act as a permission container for creating labs via + * labs.azure.com. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LabPlanInner> beginCreateOrUpdate( @@ -172,8 +171,8 @@ SyncPoller, LabPlanInner> beginCreateOrUpdate( * @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 lab Plans act as a permission container for creating labs via labs.azure.com along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of lab Plans act as a permission container for creating labs via + * labs.azure.com. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LabPlanInner> beginUpdate( @@ -190,8 +189,8 @@ SyncPoller, LabPlanInner> beginUpdate( * @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 lab Plans act as a permission container for creating labs via labs.azure.com along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of lab Plans act as a permission container for creating labs via + * labs.azure.com. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LabPlanInner> beginUpdate( @@ -238,7 +237,7 @@ SyncPoller, LabPlanInner> beginUpdate( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String labPlanName); @@ -254,7 +253,7 @@ SyncPoller, LabPlanInner> beginUpdate( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String labPlanName, Context context); @@ -298,7 +297,7 @@ SyncPoller, LabPlanInner> beginUpdate( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginSaveImage(String resourceGroupName, String labPlanName, SaveImageBody body); @@ -314,7 +313,7 @@ SyncPoller, LabPlanInner> beginUpdate( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginSaveImage( diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/LabsClient.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/LabsClient.java index d819fa36278f..4efcf57aef06 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/LabsClient.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/LabsClient.java @@ -13,7 +13,6 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.labservices.fluent.models.LabInner; import com.azure.resourcemanager.labservices.models.LabUpdate; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in LabsClient. */ public interface LabsClient { @@ -22,7 +21,7 @@ public interface LabsClient { * * @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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -35,7 +34,7 @@ public interface LabsClient { * @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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String filter, Context context); @@ -47,7 +46,7 @@ public interface LabsClient { * @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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -60,7 +59,7 @@ public interface LabsClient { * @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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -104,7 +103,7 @@ public interface LabsClient { * @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 lab resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the lab resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LabInner> beginCreateOrUpdate( @@ -121,7 +120,7 @@ SyncPoller, LabInner> beginCreateOrUpdate( * @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 lab resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the lab resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LabInner> beginCreateOrUpdate( @@ -168,7 +167,7 @@ SyncPoller, LabInner> beginCreateOrUpdate( * @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 lab resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the lab resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LabInner> beginUpdate(String resourceGroupName, String labName, LabUpdate body); @@ -184,7 +183,7 @@ SyncPoller, LabInner> beginCreateOrUpdate( * @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 lab resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the lab resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LabInner> beginUpdate( @@ -230,7 +229,7 @@ SyncPoller, LabInner> beginUpdate( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String labName); @@ -245,7 +244,7 @@ SyncPoller, LabInner> beginUpdate( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String labName, Context context); @@ -286,7 +285,7 @@ SyncPoller, LabInner> beginUpdate( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginPublish(String resourceGroupName, String labName); @@ -301,7 +300,7 @@ SyncPoller, LabInner> beginUpdate( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginPublish(String resourceGroupName, String labName, Context context); @@ -342,7 +341,7 @@ SyncPoller, LabInner> beginUpdate( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginSyncGroup(String resourceGroupName, String labName); @@ -357,7 +356,7 @@ SyncPoller, LabInner> beginUpdate( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginSyncGroup(String resourceGroupName, String labName, Context context); diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/OperationsClient.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/OperationsClient.java index e37b1ec85596..875e50915b3a 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/OperationsClient.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/OperationsClient.java @@ -17,7 +17,8 @@ public interface OperationsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +30,8 @@ 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 a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/SchedulesClient.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/SchedulesClient.java index bb82b2b3785e..3fff6ce78d76 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/SchedulesClient.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/SchedulesClient.java @@ -13,7 +13,6 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.labservices.fluent.models.ScheduleInner; import com.azure.resourcemanager.labservices.models.ScheduleUpdate; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in SchedulesClient. */ public interface SchedulesClient { @@ -26,7 +25,7 @@ public interface SchedulesClient { * @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 paged list of schedules. + * @return paged list of schedules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByLab(String resourceGroupName, String labName); @@ -42,7 +41,7 @@ public interface SchedulesClient { * @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 paged list of schedules. + * @return paged list of schedules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByLab(String resourceGroupName, String labName, String filter, Context context); @@ -167,7 +166,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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String labName, String scheduleName); @@ -184,7 +183,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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/SkusClient.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/SkusClient.java index 4d9138c2d824..3f2b83471eb2 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/SkusClient.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/SkusClient.java @@ -17,7 +17,7 @@ public interface SkusClient { * * @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 paged list of lab services skus. + * @return paged list of lab services skus as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -30,7 +30,7 @@ public interface SkusClient { * @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 paged list of lab services skus. + * @return paged list of lab services skus as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String filter, Context context); diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/UsagesClient.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/UsagesClient.java index ffd2c7787ebb..090cdeaa4145 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/UsagesClient.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/UsagesClient.java @@ -19,7 +19,7 @@ public interface UsagesClient { * @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 Core Usages. + * @return list of Core Usages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByLocation(String location); @@ -33,7 +33,7 @@ public interface UsagesClient { * @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 Core Usages. + * @return list of Core Usages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByLocation(String location, String filter, Context context); diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/UsersClient.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/UsersClient.java index dbcf10a7f46f..2422731d8c1c 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/UsersClient.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/UsersClient.java @@ -14,7 +14,6 @@ import com.azure.resourcemanager.labservices.fluent.models.UserInner; import com.azure.resourcemanager.labservices.models.InviteBody; import com.azure.resourcemanager.labservices.models.UserUpdate; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in UsersClient. */ public interface UsersClient { @@ -27,7 +26,7 @@ public interface UsersClient { * @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 paged list of users. + * @return paged list of users as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByLab(String resourceGroupName, String labName); @@ -43,7 +42,7 @@ public interface UsersClient { * @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 paged list of users. + * @return paged list of users as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByLab(String resourceGroupName, String labName, String filter, Context context); @@ -90,8 +89,8 @@ public interface UsersClient { * @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 user of a lab that can register for and use virtual machines within the lab along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of user of a lab that can register for and use virtual machines within + * the lab. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, UserInner> beginCreateOrUpdate( @@ -109,8 +108,8 @@ SyncPoller, UserInner> beginCreateOrUpdate( * @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 user of a lab that can register for and use virtual machines within the lab along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of user of a lab that can register for and use virtual machines within + * the lab. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, UserInner> beginCreateOrUpdate( @@ -161,8 +160,8 @@ UserInner createOrUpdate( * @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 user of a lab that can register for and use virtual machines within the lab along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of user of a lab that can register for and use virtual machines within + * the lab. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, UserInner> beginUpdate( @@ -180,8 +179,8 @@ SyncPoller, UserInner> beginUpdate( * @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 user of a lab that can register for and use virtual machines within the lab along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of user of a lab that can register for and use virtual machines within + * the lab. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, UserInner> beginUpdate( @@ -230,7 +229,7 @@ SyncPoller, UserInner> beginUpdate( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String labName, String username); @@ -246,7 +245,7 @@ SyncPoller, UserInner> beginUpdate( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -292,7 +291,7 @@ SyncPoller, Void> beginDelete( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginInvite( @@ -310,7 +309,7 @@ SyncPoller, Void> beginInvite( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginInvite( diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/VirtualMachinesClient.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/VirtualMachinesClient.java index c3e04ca40cb8..2b4a22c9196b 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/VirtualMachinesClient.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/VirtualMachinesClient.java @@ -13,7 +13,6 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.labservices.fluent.models.VirtualMachineInner; import com.azure.resourcemanager.labservices.models.ResetPasswordBody; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in VirtualMachinesClient. */ public interface VirtualMachinesClient { @@ -26,7 +25,7 @@ public interface VirtualMachinesClient { * @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 paged list of lab services virtual machines. + * @return paged list of lab services virtual machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByLab(String resourceGroupName, String labName); @@ -42,7 +41,7 @@ public interface VirtualMachinesClient { * @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 paged list of lab services virtual machines. + * @return paged list of lab services virtual machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByLab( @@ -93,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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart(String resourceGroupName, String labName, String virtualMachineName); @@ -110,7 +109,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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart( @@ -158,7 +157,7 @@ SyncPoller, Void> beginStart( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop(String resourceGroupName, String labName, String virtualMachineName); @@ -175,7 +174,7 @@ SyncPoller, Void> beginStart( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop( @@ -224,7 +223,7 @@ SyncPoller, Void> beginStop( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginReimage( @@ -243,7 +242,7 @@ SyncPoller, Void> beginReimage( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginReimage( @@ -293,7 +292,7 @@ SyncPoller, Void> beginReimage( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRedeploy( @@ -311,7 +310,7 @@ SyncPoller, Void> beginRedeploy( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRedeploy( @@ -360,7 +359,7 @@ SyncPoller, Void> beginRedeploy( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginResetPassword( @@ -379,7 +378,7 @@ SyncPoller, Void> beginResetPassword( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginResetPassword( diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ImageInner.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ImageInner.java index 163cd14ea210..1be0e230db81 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ImageInner.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ImageInner.java @@ -12,15 +12,12 @@ import com.azure.resourcemanager.labservices.models.OsState; import com.azure.resourcemanager.labservices.models.OsType; import com.azure.resourcemanager.labservices.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Lab services virtual machine image. */ @Fluent public final class ImageInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ImageInner.class); - /* * Metadata pertaining to creation and last modification of the image. */ @@ -230,11 +227,13 @@ public ImageInner withEnabledState(EnableState enabledState) { */ public void validate() { if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property innerProperties in model ImageInner")); } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ImageInner.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ImageProperties.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ImageProperties.java index b22b947568c4..74607f1352e0 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ImageProperties.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ImageProperties.java @@ -5,20 +5,16 @@ package com.azure.resourcemanager.labservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.models.EnableState; import com.azure.resourcemanager.labservices.models.OsState; import com.azure.resourcemanager.labservices.models.OsType; import com.azure.resourcemanager.labservices.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties of an image resource. */ @Fluent public final class ImageProperties extends ImageUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ImageProperties.class); - /* * Current provisioning state of the image. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ImageUpdateProperties.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ImageUpdateProperties.java index 2abbb7c65a1b..8f2d3249291a 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ImageUpdateProperties.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ImageUpdateProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.labservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.models.EnableState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of an image resource update. */ @Fluent public class ImageUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ImageUpdateProperties.class); - /* * Is the image enabled */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabInner.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabInner.java index 7a1883ad2563..8426af8e0ee1 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabInner.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabInner.java @@ -16,15 +16,12 @@ import com.azure.resourcemanager.labservices.models.RosterProfile; import com.azure.resourcemanager.labservices.models.SecurityProfile; import com.azure.resourcemanager.labservices.models.VirtualMachineProfile; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** The lab resource. */ @Fluent public final class LabInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabInner.class); - /* * Metadata pertaining to creation and last modification of the lab. */ @@ -311,11 +308,13 @@ public LabInner withDescription(String description) { */ public void validate() { if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property innerProperties in model LabInner")); } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(LabInner.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabPlanInner.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabPlanInner.java index d2173a69a536..5ffbf58ac5a8 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabPlanInner.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabPlanInner.java @@ -13,7 +13,6 @@ import com.azure.resourcemanager.labservices.models.LabPlanNetworkProfile; import com.azure.resourcemanager.labservices.models.ProvisioningState; import com.azure.resourcemanager.labservices.models.SupportInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -24,8 +23,6 @@ */ @Fluent public final class LabPlanInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabPlanInner.class); - /* * Metadata pertaining to creation and last modification of the lab plan. */ @@ -261,11 +258,13 @@ public LabPlanInner withLinkedLmsInstance(String linkedLmsInstance) { */ public void validate() { if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property innerProperties in model LabPlanInner")); } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(LabPlanInner.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabPlanProperties.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabPlanProperties.java index 838570cc5465..56a0500b36f2 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabPlanProperties.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabPlanProperties.java @@ -5,21 +5,17 @@ package com.azure.resourcemanager.labservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.models.AutoShutdownProfile; import com.azure.resourcemanager.labservices.models.ConnectionProfile; import com.azure.resourcemanager.labservices.models.LabPlanNetworkProfile; import com.azure.resourcemanager.labservices.models.ProvisioningState; import com.azure.resourcemanager.labservices.models.SupportInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Lab plan resource properties. */ @Fluent public final class LabPlanProperties extends LabPlanUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabPlanProperties.class); - /* * Current provisioning state of the lab plan. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabPlanUpdateProperties.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabPlanUpdateProperties.java index 1518ebb7c997..dcf14fef990f 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabPlanUpdateProperties.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabPlanUpdateProperties.java @@ -5,20 +5,16 @@ package com.azure.resourcemanager.labservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.models.AutoShutdownProfile; import com.azure.resourcemanager.labservices.models.ConnectionProfile; import com.azure.resourcemanager.labservices.models.LabPlanNetworkProfile; import com.azure.resourcemanager.labservices.models.SupportInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Lab plan resource properties for updates. */ @Fluent public class LabPlanUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabPlanUpdateProperties.class); - /* * The default lab connection profile. This can be changed on a lab * resource and only provides a default profile. diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabProperties.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabProperties.java index c081d888fb97..5163252006d5 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabProperties.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabProperties.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.labservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.models.AutoShutdownProfile; import com.azure.resourcemanager.labservices.models.ConnectionProfile; import com.azure.resourcemanager.labservices.models.LabNetworkProfile; @@ -14,14 +13,11 @@ import com.azure.resourcemanager.labservices.models.RosterProfile; import com.azure.resourcemanager.labservices.models.SecurityProfile; import com.azure.resourcemanager.labservices.models.VirtualMachineProfile; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of a lab resource. */ @Fluent public final class LabProperties extends LabUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabProperties.class); - /* * Current provisioning state of the lab. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabServicesSkuInner.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabServicesSkuInner.java index a3c61eb421f3..e8a6078b0bfe 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabServicesSkuInner.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabServicesSkuInner.java @@ -5,21 +5,17 @@ package com.azure.resourcemanager.labservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.models.LabServicesSkuCapabilities; import com.azure.resourcemanager.labservices.models.LabServicesSkuCapacity; import com.azure.resourcemanager.labservices.models.LabServicesSkuCost; import com.azure.resourcemanager.labservices.models.LabServicesSkuRestrictions; import com.azure.resourcemanager.labservices.models.LabServicesSkuTier; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Azure Lab Services resource SKUs. */ @Fluent public final class LabServicesSkuInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabServicesSkuInner.class); - /* * The lab services resource type. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabUpdateProperties.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabUpdateProperties.java index 57e9626b758a..aed88ebdd940 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabUpdateProperties.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/LabUpdateProperties.java @@ -5,20 +5,16 @@ package com.azure.resourcemanager.labservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.models.AutoShutdownProfile; import com.azure.resourcemanager.labservices.models.ConnectionProfile; import com.azure.resourcemanager.labservices.models.RosterProfile; import com.azure.resourcemanager.labservices.models.SecurityProfile; import com.azure.resourcemanager.labservices.models.VirtualMachineProfile; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of a lab resource used for updates. */ @Fluent public class LabUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabUpdateProperties.class); - /* * The resource auto shutdown configuration for the lab. This controls * whether actions are taken on resources that are sitting idle. diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/OperationInner.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/OperationInner.java index 6ed316ad2457..74e9cae49a37 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/OperationInner.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/OperationInner.java @@ -5,18 +5,14 @@ package com.azure.resourcemanager.labservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.models.ActionType; import com.azure.resourcemanager.labservices.models.OperationDisplay; import com.azure.resourcemanager.labservices.models.Origin; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** REST API Operation Details of a REST API operation, returned from the Resource Provider Operations API. */ @Fluent public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - /* * The name of the operation, as per Resource-Based Access Control (RBAC). * Examples: "Microsoft.Compute/virtualMachines/write", diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/OperationResultInner.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/OperationResultInner.java index f87735fbf465..eb18edbfc428 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/OperationResultInner.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/OperationResultInner.java @@ -8,15 +8,12 @@ import com.azure.core.management.exception.ManagementError; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.models.OperationStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** A long running operation result. */ @Fluent public final class OperationResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultInner.class); - /* * Fully qualified resource ID for the resource. Ex - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -186,9 +183,11 @@ public OperationResultInner withError(ManagementError error) { */ public void validate() { if (status() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property status in model OperationResultInner")); } } + + private static final ClientLogger LOGGER = new ClientLogger(OperationResultInner.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ScheduleInner.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ScheduleInner.java index 343df0cfd305..c24b94efb167 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ScheduleInner.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ScheduleInner.java @@ -10,15 +10,12 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.models.ProvisioningState; import com.azure.resourcemanager.labservices.models.RecurrencePattern; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Schedule for automatically turning virtual machines in a lab on and off at specified times. */ @Fluent public final class ScheduleInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduleInner.class); - /* * Metadata pertaining to creation and last modification of the schedule. */ @@ -184,11 +181,13 @@ public ScheduleInner withNotes(String notes) { */ public void validate() { if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property innerProperties in model ScheduleInner")); } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ScheduleInner.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ScheduleProperties.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ScheduleProperties.java index 2768dd30887e..1838cdc573db 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ScheduleProperties.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ScheduleProperties.java @@ -5,18 +5,14 @@ package com.azure.resourcemanager.labservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.models.ProvisioningState; import com.azure.resourcemanager.labservices.models.RecurrencePattern; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Schedule resource properties. */ @Fluent public final class ScheduleProperties extends ScheduleUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduleProperties.class); - /* * Current provisioning state of the schedule. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ScheduleUpdateProperties.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ScheduleUpdateProperties.java index a992a75361c8..6390a99bb477 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ScheduleUpdateProperties.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/ScheduleUpdateProperties.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.labservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.models.RecurrencePattern; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Schedule resource properties used for updates. */ @Fluent public class ScheduleUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduleUpdateProperties.class); - /* * When lab user virtual machines will be started. Timestamp offsets will * be ignored and timeZoneId is used instead. diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UsageInner.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UsageInner.java index e7894554ae57..5d01e53be0e2 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UsageInner.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UsageInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.labservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.models.UsageName; import com.azure.resourcemanager.labservices.models.UsageUnit; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The core usage details. */ @Fluent public final class UsageInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageInner.class); - /* * The current usage. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UserInner.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UserInner.java index 9322e780b732..3622e211322e 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UserInner.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UserInner.java @@ -11,7 +11,6 @@ import com.azure.resourcemanager.labservices.models.InvitationState; import com.azure.resourcemanager.labservices.models.ProvisioningState; import com.azure.resourcemanager.labservices.models.RegistrationState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; import java.time.OffsetDateTime; @@ -19,8 +18,6 @@ /** User of a lab that can register for and use virtual machines within the lab. */ @Fluent public final class UserInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserInner.class); - /* * Metadata pertaining to creation and last modification of the user * resource. @@ -161,11 +158,13 @@ public UserInner withAdditionalUsageQuota(Duration additionalUsageQuota) { */ public void validate() { if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property innerProperties in model UserInner")); } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(UserInner.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UserProperties.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UserProperties.java index 47c2601fe706..6f627368ef94 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UserProperties.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UserProperties.java @@ -9,7 +9,6 @@ import com.azure.resourcemanager.labservices.models.InvitationState; import com.azure.resourcemanager.labservices.models.ProvisioningState; import com.azure.resourcemanager.labservices.models.RegistrationState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; import java.time.OffsetDateTime; @@ -17,8 +16,6 @@ /** User resource properties. */ @Fluent public final class UserProperties extends UserUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserProperties.class); - /* * Current provisioning state of the user resource. */ @@ -151,9 +148,11 @@ public UserProperties withAdditionalUsageQuota(Duration additionalUsageQuota) { public void validate() { super.validate(); if (email() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property email in model UserProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(UserProperties.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UserUpdateProperties.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UserUpdateProperties.java index e28da807e534..0b75284eba32 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UserUpdateProperties.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UserUpdateProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.labservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; /** User resource properties used for updates. */ @Fluent public class UserUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserUpdateProperties.class); - /* * The amount of usage quota time the user gets in addition to the lab * usage quota. diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/VirtualMachineInner.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/VirtualMachineInner.java index 0ed584eb0d88..360f396e37ec 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/VirtualMachineInner.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/VirtualMachineInner.java @@ -12,14 +12,11 @@ import com.azure.resourcemanager.labservices.models.VirtualMachineConnectionProfile; import com.azure.resourcemanager.labservices.models.VirtualMachineState; import com.azure.resourcemanager.labservices.models.VirtualMachineType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A lab virtual machine resource. */ @Fluent public final class VirtualMachineInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachineInner.class); - /* * System data of the Lab virtual machine. */ @@ -102,7 +99,7 @@ public VirtualMachineType vmType() { */ public void validate() { if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property innerProperties in model VirtualMachineInner")); @@ -110,4 +107,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(VirtualMachineInner.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/VirtualMachineProperties.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/VirtualMachineProperties.java index c932bf475361..8ae35f8141ab 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/VirtualMachineProperties.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/VirtualMachineProperties.java @@ -5,19 +5,15 @@ package com.azure.resourcemanager.labservices.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.models.ProvisioningState; import com.azure.resourcemanager.labservices.models.VirtualMachineConnectionProfile; import com.azure.resourcemanager.labservices.models.VirtualMachineState; import com.azure.resourcemanager.labservices.models.VirtualMachineType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Virtual machine resource properties. */ @Immutable public final class VirtualMachineProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachineProperties.class); - /* * Current provisioning state of the virtual machine. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/ImageImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/ImageImpl.java index c048acde3399..706ece2f0162 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/ImageImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/ImageImpl.java @@ -106,6 +106,10 @@ public EnableState enabledState() { return this.innerModel().enabledState(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ImageInner innerModel() { return this.innerObject; } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/ImagesClientImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/ImagesClientImpl.java index e6c6c6426aa6..b04b94ace5b7 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/ImagesClientImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/ImagesClientImpl.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.labservices.fluent.ImagesClient; import com.azure.resourcemanager.labservices.fluent.models.ImageInner; import com.azure.resourcemanager.labservices.models.ImageUpdate; @@ -37,8 +36,6 @@ /** An instance of this class provides access to all the operations defined in ImagesClient. */ public final class ImagesClientImpl implements ImagesClient { - private final ClientLogger logger = new ClientLogger(ImagesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ImagesService service; @@ -269,7 +266,7 @@ private Mono> listByLabPlanSinglePageAsync( * @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 all images from galleries attached to a lab plan. + * @return all images from galleries attached to a lab plan as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLabPlanAsync(String resourceGroupName, String labPlanName, String filter) { @@ -287,7 +284,7 @@ private PagedFlux listByLabPlanAsync(String resourceGroupName, Strin * @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 all images from galleries attached to a lab plan. + * @return all images from galleries attached to a lab plan as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLabPlanAsync(String resourceGroupName, String labPlanName) { @@ -308,7 +305,7 @@ private PagedFlux listByLabPlanAsync(String resourceGroupName, Strin * @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 all images from galleries attached to a lab plan. + * @return all images from galleries attached to a lab plan as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLabPlanAsync( @@ -327,7 +324,7 @@ private PagedFlux listByLabPlanAsync( * @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 all images from galleries attached to a lab plan. + * @return all images from galleries attached to a lab plan as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByLabPlan(String resourceGroupName, String labPlanName) { @@ -346,7 +343,7 @@ public PagedIterable listByLabPlan(String resourceGroupName, String * @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 all images from galleries attached to a lab plan. + * @return all images from galleries attached to a lab plan as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByLabPlan( @@ -475,14 +472,7 @@ private Mono> getWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labPlanName, String imageName) { return getWithResponseAsync(resourceGroupName, labPlanName, imageName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -658,14 +648,7 @@ private Mono> createOrUpdateWithResponseAsync( private Mono createOrUpdateAsync( String resourceGroupName, String labPlanName, String imageName, ImageInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, labPlanName, imageName, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -843,14 +826,7 @@ private Mono> updateWithResponseAsync( private Mono updateAsync( String resourceGroupName, String labPlanName, String imageName, ImageUpdate body) { return updateWithResponseAsync(resourceGroupName, labPlanName, imageName, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/ImagesImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/ImagesImpl.java index 8a5d05397e35..eb1a6e250b67 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/ImagesImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/ImagesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.labservices.fluent.models.ImageInner; import com.azure.resourcemanager.labservices.models.Image; import com.azure.resourcemanager.labservices.models.Images; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ImagesImpl implements Images { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ImagesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ImagesImpl.class); private final ImagesClient innerClient; @@ -67,7 +66,7 @@ public Response getWithResponse( public Image getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -75,14 +74,14 @@ public Image getById(String id) { } String labPlanName = Utils.getValueFromIdByName(id, "labPlans"); if (labPlanName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labPlans'.", id))); } String imageName = Utils.getValueFromIdByName(id, "images"); if (imageName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'images'.", id))); @@ -93,7 +92,7 @@ public Image 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 @@ -101,14 +100,14 @@ public Response getByIdWithResponse(String id, Context context) { } String labPlanName = Utils.getValueFromIdByName(id, "labPlans"); if (labPlanName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labPlans'.", id))); } String imageName = Utils.getValueFromIdByName(id, "images"); if (imageName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'images'.", id))); diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabImpl.java index 42ff0d1f3c2d..e3cb91f79b9b 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabImpl.java @@ -108,6 +108,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public LabInner innerModel() { return this.innerObject; } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabPlanImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabPlanImpl.java index a4ef92ed0a05..448553b514aa 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabPlanImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabPlanImpl.java @@ -99,6 +99,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public LabPlanInner innerModel() { return this.innerObject; } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabPlansClientImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabPlansClientImpl.java index f46e03e89055..7871d6b5a86c 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabPlansClientImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabPlansClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.labservices.fluent.LabPlansClient; @@ -45,8 +44,6 @@ /** An instance of this class provides access to all the operations defined in LabPlansClient. */ public final class LabPlansClientImpl implements LabPlansClient { - private final ClientLogger logger = new ClientLogger(LabPlansClientImpl.class); - /** The proxy service used to perform REST calls. */ private final LabPlansService service; @@ -294,7 +291,7 @@ private Mono> listSinglePageAsync(String filter, 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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter) { @@ -307,7 +304,7 @@ private PagedFlux listAsync(String filter) { * * @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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -324,7 +321,7 @@ 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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter, Context context) { @@ -338,7 +335,7 @@ private PagedFlux listAsync(String filter, 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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -354,7 +351,7 @@ 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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Context context) { @@ -469,7 +466,7 @@ private Mono> listByResourceGroupSinglePageAsync( * @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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -486,7 +483,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam * @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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -502,7 +499,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam * @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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -517,7 +514,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName) * @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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -637,14 +634,7 @@ private Mono> getByResourceGroupWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String labPlanName) { return getByResourceGroupWithResponseAsync(resourceGroupName, labPlanName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -803,8 +793,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 lab Plans act as a permission container for creating labs via labs.azure.com along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of lab Plans act as a permission container for creating labs via + * labs.azure.com. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LabPlanInner> beginCreateOrUpdateAsync( @@ -827,8 +817,8 @@ private PollerFlux, LabPlanInner> beginCreateOrUpdateAs * @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 lab Plans act as a permission container for creating labs via labs.azure.com along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of lab Plans act as a permission container for creating labs via + * labs.azure.com. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LabPlanInner> beginCreateOrUpdateAsync( @@ -852,8 +842,8 @@ private PollerFlux, LabPlanInner> beginCreateOrUpdateAs * @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 lab Plans act as a permission container for creating labs via labs.azure.com along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of lab Plans act as a permission container for creating labs via + * labs.azure.com. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LabPlanInner> beginCreateOrUpdate( @@ -872,8 +862,8 @@ public SyncPoller, LabPlanInner> beginCreateOrUpdate( * @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 lab Plans act as a permission container for creating labs via labs.azure.com along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of lab Plans act as a permission container for creating labs via + * labs.azure.com. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LabPlanInner> beginCreateOrUpdate( @@ -1081,8 +1071,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 lab Plans act as a permission container for creating labs via labs.azure.com along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of lab Plans act as a permission container for creating labs via + * labs.azure.com. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LabPlanInner> beginUpdateAsync( @@ -1105,8 +1095,8 @@ private PollerFlux, LabPlanInner> beginUpdateAsync( * @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 lab Plans act as a permission container for creating labs via labs.azure.com along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of lab Plans act as a permission container for creating labs via + * labs.azure.com. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LabPlanInner> beginUpdateAsync( @@ -1129,8 +1119,8 @@ private PollerFlux, LabPlanInner> beginUpdateAsync( * @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 lab Plans act as a permission container for creating labs via labs.azure.com along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of lab Plans act as a permission container for creating labs via + * labs.azure.com. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LabPlanInner> beginUpdate( @@ -1149,8 +1139,8 @@ public SyncPoller, LabPlanInner> beginUpdate( * @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 lab Plans act as a permission container for creating labs via labs.azure.com along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of lab Plans act as a permission container for creating labs via + * labs.azure.com. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LabPlanInner> beginUpdate( @@ -1342,7 +1332,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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String labPlanName) { @@ -1364,7 +1354,7 @@ private PollerFlux, Void> beginDeleteAsync(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 the {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1386,7 +1376,7 @@ private PollerFlux, Void> beginDeleteAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String labPlanName) { @@ -1404,7 +1394,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1602,7 +1592,7 @@ private Mono>> saveImageWithResponseAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginSaveImageAsync( @@ -1625,7 +1615,7 @@ private PollerFlux, Void> beginSaveImageAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginSaveImageAsync( @@ -1648,7 +1638,7 @@ private PollerFlux, Void> beginSaveImageAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginSaveImage( @@ -1667,7 +1657,7 @@ public SyncPoller, Void> beginSaveImage( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginSaveImage( diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabPlansImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabPlansImpl.java index ee6f8bd4a1d4..ef2aaf0518d9 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabPlansImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabPlansImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.labservices.models.LabPlan; import com.azure.resourcemanager.labservices.models.LabPlans; import com.azure.resourcemanager.labservices.models.SaveImageBody; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class LabPlansImpl implements LabPlans { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabPlansImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(LabPlansImpl.class); private final LabPlansClient innerClient; @@ -92,7 +91,7 @@ public void saveImage(String resourceGroupName, String labPlanName, SaveImageBod public LabPlan getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -100,7 +99,7 @@ public LabPlan getById(String id) { } String labPlanName = Utils.getValueFromIdByName(id, "labPlans"); if (labPlanName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labPlans'.", id))); @@ -111,7 +110,7 @@ public LabPlan 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 @@ -119,7 +118,7 @@ public Response getByIdWithResponse(String id, Context context) { } String labPlanName = Utils.getValueFromIdByName(id, "labPlans"); if (labPlanName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labPlans'.", id))); @@ -130,7 +129,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -138,7 +137,7 @@ public void deleteById(String id) { } String labPlanName = Utils.getValueFromIdByName(id, "labPlans"); if (labPlanName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labPlans'.", id))); @@ -149,7 +148,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -157,7 +156,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String labPlanName = Utils.getValueFromIdByName(id, "labPlans"); if (labPlanName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labPlans'.", id))); diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabServicesClientBuilder.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabServicesClientBuilder.java index 6459a4b3ec06..ea8ccac327a9 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabServicesClientBuilder.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabServicesClientBuilder.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.AzureEnvironment; @@ -67,34 +66,34 @@ public LabServicesClientBuilder environment(AzureEnvironment environment) { } /* - * The default poll interval for long-running operation + * The HTTP pipeline to send requests through */ - private Duration defaultPollInterval; + private HttpPipeline pipeline; /** - * Sets The default poll interval for long-running operation. + * Sets The HTTP pipeline to send requests through. * - * @param defaultPollInterval the defaultPollInterval value. + * @param pipeline the pipeline value. * @return the LabServicesClientBuilder. */ - public LabServicesClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public LabServicesClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; return this; } /* - * The HTTP pipeline to send requests through + * The default poll interval for long-running operation */ - private HttpPipeline pipeline; + private Duration defaultPollInterval; /** - * Sets The HTTP pipeline to send requests through. + * Sets The default poll interval for long-running operation. * - * @param pipeline the pipeline value. + * @param defaultPollInterval the defaultPollInterval value. * @return the LabServicesClientBuilder. */ - public LabServicesClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public LabServicesClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -126,15 +125,12 @@ public LabServicesClientImpl buildClient() { if (environment == null) { this.environment = AzureEnvironment.AZURE; } + if (pipeline == null) { + this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + } if (defaultPollInterval == null) { this.defaultPollInterval = Duration.ofSeconds(30); } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } if (serializerAdapter == null) { this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabServicesClientImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabServicesClientImpl.java index fdfdc83df220..4495bdc9f391 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabServicesClientImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabServicesClientImpl.java @@ -15,6 +15,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; @@ -38,15 +39,12 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.Map; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** Initializes a new instance of the LabServicesClientImpl type. */ @ServiceClient(builder = LabServicesClientBuilder.class) public final class LabServicesClientImpl implements LabServicesClient { - private final ClientLogger logger = new ClientLogger(LabServicesClientImpl.class); - /** The ID of the target subscription. */ private final String subscriptionId; @@ -290,10 +288,7 @@ public Context getContext() { * @return the merged context. */ public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; + return CoreUtils.mergeContexts(this.getContext(), context); } /** @@ -357,7 +352,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -416,4 +411,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(LabServicesClientImpl.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabsClientImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabsClientImpl.java index a2fefb18bc2d..eba67f06b1a1 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabsClientImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabsClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.labservices.fluent.LabsClient; @@ -44,8 +43,6 @@ /** An instance of this class provides access to all the operations defined in LabsClient. */ public final class LabsClientImpl implements LabsClient { - private final ClientLogger logger = new ClientLogger(LabsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final LabsService service; @@ -305,7 +302,7 @@ private Mono> listSinglePageAsync(String filter, Context * @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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter) { @@ -318,7 +315,7 @@ private PagedFlux listAsync(String filter) { * * @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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -335,7 +332,7 @@ 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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter, Context context) { @@ -349,7 +346,7 @@ private PagedFlux listAsync(String filter, 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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -365,7 +362,7 @@ 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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Context context) { @@ -480,7 +477,7 @@ private Mono> listByResourceGroupSinglePageAsync( * @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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -497,7 +494,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName) { * @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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -513,7 +510,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName, C * @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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -528,7 +525,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName) { * @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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -644,14 +641,7 @@ private Mono> getByResourceGroupWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String labName) { return getByResourceGroupWithResponseAsync(resourceGroupName, labName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -808,7 +798,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 lab resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of the lab resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LabInner> beginCreateOrUpdateAsync( @@ -831,7 +821,7 @@ private PollerFlux, LabInner> beginCreateOrUpdateAsync( * @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 lab resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of the lab resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LabInner> beginCreateOrUpdateAsync( @@ -855,7 +845,7 @@ private PollerFlux, LabInner> beginCreateOrUpdateAsync( * @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 lab resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the lab resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LabInner> beginCreateOrUpdate( @@ -874,7 +864,7 @@ public SyncPoller, LabInner> beginCreateOrUpdate( * @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 lab resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the lab resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LabInner> beginCreateOrUpdate( @@ -1077,7 +1067,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 the lab resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of the lab resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LabInner> beginUpdateAsync( @@ -1100,7 +1090,7 @@ private PollerFlux, LabInner> beginUpdateAsync( * @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 lab resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of the lab resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LabInner> beginUpdateAsync( @@ -1123,7 +1113,7 @@ private PollerFlux, LabInner> beginUpdateAsync( * @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 lab resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the lab resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LabInner> beginUpdate( @@ -1142,7 +1132,7 @@ public SyncPoller, LabInner> beginUpdate( * @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 lab resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the lab resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LabInner> beginUpdate( @@ -1326,7 +1316,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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String labName) { @@ -1347,7 +1337,7 @@ private PollerFlux, Void> beginDeleteAsync(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 the {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1368,7 +1358,7 @@ private PollerFlux, Void> beginDeleteAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String labName) { @@ -1385,7 +1375,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String labName, Context context) { @@ -1562,7 +1552,7 @@ private Mono>> publishWithResponseAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String labName) { @@ -1583,7 +1573,7 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginPublishAsync( @@ -1604,7 +1594,7 @@ private PollerFlux, Void> beginPublishAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPublish(String resourceGroupName, String labName) { @@ -1621,7 +1611,7 @@ public SyncPoller, Void> beginPublish(String resourceGroupName, * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPublish(String resourceGroupName, String labName, Context context) { @@ -1798,7 +1788,7 @@ private Mono>> syncGroupWithResponseAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginSyncGroupAsync(String resourceGroupName, String labName) { @@ -1819,7 +1809,7 @@ private PollerFlux, Void> beginSyncGroupAsync(String resourceGr * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginSyncGroupAsync( @@ -1840,7 +1830,7 @@ private PollerFlux, Void> beginSyncGroupAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginSyncGroup(String resourceGroupName, String labName) { @@ -1857,7 +1847,7 @@ public SyncPoller, Void> beginSyncGroup(String resourceGroupNam * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginSyncGroup( diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabsImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabsImpl.java index a84ab0c3d071..9ecf553c73ef 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabsImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/LabsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.labservices.fluent.models.LabInner; import com.azure.resourcemanager.labservices.models.Lab; import com.azure.resourcemanager.labservices.models.Labs; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class LabsImpl implements Labs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(LabsImpl.class); private final LabsClient innerClient; @@ -97,7 +96,7 @@ public void syncGroup(String resourceGroupName, String labName, Context context) public Lab getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -105,7 +104,7 @@ public Lab getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); @@ -116,7 +115,7 @@ public Lab 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 @@ -124,7 +123,7 @@ public Response getByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); @@ -135,7 +134,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -143,7 +142,7 @@ public void deleteById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); @@ -154,7 +153,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -162,7 +161,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/OperationResultsClientImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/OperationResultsClientImpl.java index 3146f009721d..ed70f8da8cbc 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/OperationResultsClientImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/OperationResultsClientImpl.java @@ -21,15 +21,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.labservices.fluent.OperationResultsClient; import com.azure.resourcemanager.labservices.fluent.models.OperationResultInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in OperationResultsClient. */ public final class OperationResultsClientImpl implements OperationResultsClient { - private final ClientLogger logger = new ClientLogger(OperationResultsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationResultsService service; @@ -160,15 +157,7 @@ private Mono> getWithResponseAsync(String operati */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String operationResultId) { - return getWithResponseAsync(operationResultId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(operationResultId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/OperationResultsImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/OperationResultsImpl.java index 3139788681d7..d45eb68d3fbb 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/OperationResultsImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/OperationResultsImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.labservices.fluent.models.OperationResultInner; import com.azure.resourcemanager.labservices.models.OperationResult; import com.azure.resourcemanager.labservices.models.OperationResults; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationResultsImpl implements OperationResults { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationResultsImpl.class); private final OperationResultsClient innerClient; diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/OperationsClientImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/OperationsClientImpl.java index d81328e66bc0..b830c8d01db4 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/OperationsClientImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/OperationsClientImpl.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.labservices.fluent.OperationsClient; import com.azure.resourcemanager.labservices.fluent.models.OperationInner; import com.azure.resourcemanager.labservices.models.OperationListResult; @@ -33,8 +32,6 @@ /** 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; @@ -150,7 +147,8 @@ private Mono> listSinglePageAsync(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 a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -164,7 +162,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 a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -177,7 +176,8 @@ private PagedFlux listAsync(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 a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -191,7 +191,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 a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/OperationsImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/OperationsImpl.java index 3c411f711f87..5f5e5e0e3d57 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/OperationsImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.labservices.fluent.models.OperationInner; import com.azure.resourcemanager.labservices.models.Operation; import com.azure.resourcemanager.labservices.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/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/ScheduleImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/ScheduleImpl.java index e1d8c87be63f..9cbf9fe5740d 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/ScheduleImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/ScheduleImpl.java @@ -58,6 +58,10 @@ public String notes() { return this.innerModel().notes(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ScheduleInner innerModel() { return this.innerObject; } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/SchedulesClientImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/SchedulesClientImpl.java index e9ef6db0f15e..2f988a789eab 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/SchedulesClientImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/SchedulesClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.labservices.fluent.SchedulesClient; @@ -43,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in SchedulesClient. */ public final class SchedulesClientImpl implements SchedulesClient { - private final ClientLogger logger = new ClientLogger(SchedulesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final SchedulesService service; @@ -290,7 +287,7 @@ private Mono> listByLabSinglePageAsync( * @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 paged list of schedules. + * @return paged list of schedules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLabAsync(String resourceGroupName, String labName, String filter) { @@ -308,7 +305,7 @@ private PagedFlux listByLabAsync(String resourceGroupName, String * @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 paged list of schedules. + * @return paged list of schedules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLabAsync(String resourceGroupName, String labName) { @@ -329,7 +326,7 @@ private PagedFlux listByLabAsync(String resourceGroupName, String * @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 paged list of schedules. + * @return paged list of schedules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLabAsync( @@ -348,7 +345,7 @@ private PagedFlux listByLabAsync( * @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 paged list of schedules. + * @return paged list of schedules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByLab(String resourceGroupName, String labName) { @@ -367,7 +364,7 @@ public PagedIterable listByLab(String resourceGroupName, String l * @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 paged list of schedules. + * @return paged list of schedules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByLab( @@ -502,14 +499,7 @@ private Mono> getWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String scheduleName) { return getWithResponseAsync(resourceGroupName, labName, scheduleName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -694,14 +684,7 @@ private Mono> createOrUpdateWithResponseAsync( private Mono createOrUpdateAsync( String resourceGroupName, String labName, String scheduleName, ScheduleInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, labName, scheduleName, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -889,14 +872,7 @@ private Mono> updateWithResponseAsync( private Mono updateAsync( String resourceGroupName, String labName, String scheduleName, ScheduleUpdate body) { return updateWithResponseAsync(resourceGroupName, labName, scheduleName, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1059,7 +1035,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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1083,7 +1059,7 @@ private PollerFlux, Void> beginDeleteAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1107,7 +1083,7 @@ private PollerFlux, Void> beginDeleteAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1127,7 +1103,7 @@ public SyncPoller, Void> beginDelete( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/SchedulesImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/SchedulesImpl.java index 3651bc5894a3..3db51961aff6 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/SchedulesImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/SchedulesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.labservices.fluent.models.ScheduleInner; import com.azure.resourcemanager.labservices.models.Schedule; import com.azure.resourcemanager.labservices.models.Schedules; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class SchedulesImpl implements Schedules { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SchedulesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(SchedulesImpl.class); private final SchedulesClient innerClient; @@ -74,7 +73,7 @@ public void delete(String resourceGroupName, String labName, String scheduleName public Schedule getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -82,14 +81,14 @@ public Schedule getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String scheduleName = Utils.getValueFromIdByName(id, "schedules"); if (scheduleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); @@ -100,7 +99,7 @@ public Schedule 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 @@ -108,14 +107,14 @@ public Response getByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String scheduleName = Utils.getValueFromIdByName(id, "schedules"); if (scheduleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); @@ -126,7 +125,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -134,14 +133,14 @@ public void deleteById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String scheduleName = Utils.getValueFromIdByName(id, "schedules"); if (scheduleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); @@ -152,7 +151,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -160,14 +159,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String scheduleName = Utils.getValueFromIdByName(id, "schedules"); if (scheduleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/SkusClientImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/SkusClientImpl.java index 50df92c21d18..dcc37878e760 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/SkusClientImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/SkusClientImpl.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.labservices.fluent.SkusClient; import com.azure.resourcemanager.labservices.fluent.models.LabServicesSkuInner; import com.azure.resourcemanager.labservices.models.PagedLabServicesSkus; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in SkusClient. */ public final class SkusClientImpl implements SkusClient { - private final ClientLogger logger = new ClientLogger(SkusClientImpl.class); - /** The proxy service used to perform REST calls. */ private final SkusService service; @@ -182,7 +179,7 @@ private Mono> listSinglePageAsync(String filt * @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 paged list of lab services skus. + * @return paged list of lab services skus as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter) { @@ -194,7 +191,7 @@ private PagedFlux listAsync(String filter) { * * @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 paged list of lab services skus. + * @return paged list of lab services skus as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -210,7 +207,7 @@ 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 paged list of lab services skus. + * @return paged list of lab services skus as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter, Context context) { @@ -223,7 +220,7 @@ private PagedFlux listAsync(String filter, 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 paged list of lab services skus. + * @return paged list of lab services skus as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -239,7 +236,7 @@ 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 paged list of lab services skus. + * @return paged list of lab services skus as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Context context) { diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/SkusImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/SkusImpl.java index 531502d393fc..79ca4615e703 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/SkusImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/SkusImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.labservices.fluent.models.LabServicesSkuInner; import com.azure.resourcemanager.labservices.models.LabServicesSku; import com.azure.resourcemanager.labservices.models.Skus; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class SkusImpl implements Skus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkusImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(SkusImpl.class); private final SkusClient innerClient; diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsagesClientImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsagesClientImpl.java index 7d1275df6803..6557a7dc757b 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsagesClientImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsagesClientImpl.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.labservices.fluent.UsagesClient; import com.azure.resourcemanager.labservices.fluent.models.UsageInner; import com.azure.resourcemanager.labservices.models.ListUsagesResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in UsagesClient. */ public final class UsagesClientImpl implements UsagesClient { - private final ClientLogger logger = new ClientLogger(UsagesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final UsagesService service; @@ -193,7 +190,7 @@ private Mono> listByLocationSinglePageAsync( * @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 Core Usages. + * @return list of Core Usages as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLocationAsync(String location, String filter) { @@ -209,7 +206,7 @@ private PagedFlux listByLocationAsync(String location, String filter * @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 Core Usages. + * @return list of Core Usages as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLocationAsync(String location) { @@ -228,7 +225,7 @@ private PagedFlux listByLocationAsync(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 list of Core Usages. + * @return list of Core Usages as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLocationAsync(String location, String filter, Context context) { @@ -244,7 +241,7 @@ private PagedFlux listByLocationAsync(String location, String filter * @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 Core Usages. + * @return list of Core Usages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByLocation(String location) { @@ -261,7 +258,7 @@ public PagedIterable listByLocation(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 list of Core Usages. + * @return list of Core Usages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByLocation(String location, String filter, Context context) { diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsagesImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsagesImpl.java index 945f799f6a08..ed4123593c1f 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsagesImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsagesImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.labservices.fluent.models.UsageInner; import com.azure.resourcemanager.labservices.models.Usage; import com.azure.resourcemanager.labservices.models.Usages; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class UsagesImpl implements Usages { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsagesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(UsagesImpl.class); private final UsagesClient innerClient; diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UserImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UserImpl.java index 1c64223673fe..c5e036a0800c 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UserImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UserImpl.java @@ -69,6 +69,10 @@ public Duration additionalUsageQuota() { return this.innerModel().additionalUsageQuota(); } + public String resourceGroupName() { + return resourceGroupName; + } + public UserInner innerModel() { return this.innerObject; } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsersClientImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsersClientImpl.java index b373ac30f49c..e7c4d1c392e3 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsersClientImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsersClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.labservices.fluent.UsersClient; @@ -45,8 +44,6 @@ /** An instance of this class provides access to all the operations defined in UsersClient. */ public final class UsersClientImpl implements UsersClient { - private final ClientLogger logger = new ClientLogger(UsersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final UsersService service; @@ -308,7 +305,7 @@ private Mono> listByLabSinglePageAsync( * @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 paged list of users. + * @return paged list of users as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLabAsync(String resourceGroupName, String labName, String filter) { @@ -326,7 +323,7 @@ private PagedFlux listByLabAsync(String resourceGroupName, String lab * @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 paged list of users. + * @return paged list of users as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLabAsync(String resourceGroupName, String labName) { @@ -347,7 +344,7 @@ private PagedFlux listByLabAsync(String resourceGroupName, String lab * @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 paged list of users. + * @return paged list of users as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLabAsync( @@ -366,7 +363,7 @@ private PagedFlux listByLabAsync( * @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 paged list of users. + * @return paged list of users as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByLab(String resourceGroupName, String labName) { @@ -385,7 +382,7 @@ public PagedIterable listByLab(String resourceGroupName, String labNa * @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 paged list of users. + * @return paged list of users as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByLab( @@ -516,14 +513,7 @@ private Mono> getWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String username) { return getWithResponseAsync(resourceGroupName, labName, username) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -695,8 +685,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 user of a lab that can register for and use virtual machines within the lab along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of user of a lab that can register for and use virtual machines within + * the lab. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, UserInner> beginCreateOrUpdateAsync( @@ -721,8 +711,8 @@ private PollerFlux, UserInner> beginCreateOrUpdateAsync( * @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 user of a lab that can register for and use virtual machines within the lab along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of user of a lab that can register for and use virtual machines within + * the lab. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, UserInner> beginCreateOrUpdateAsync( @@ -747,8 +737,8 @@ private PollerFlux, UserInner> beginCreateOrUpdateAsync( * @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 user of a lab that can register for and use virtual machines within the lab along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of user of a lab that can register for and use virtual machines within + * the lab. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, UserInner> beginCreateOrUpdate( @@ -768,8 +758,8 @@ public SyncPoller, UserInner> beginCreateOrUpdate( * @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 user of a lab that can register for and use virtual machines within the lab along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of user of a lab that can register for and use virtual machines within + * the lab. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, UserInner> beginCreateOrUpdate( @@ -993,8 +983,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 user of a lab that can register for and use virtual machines within the lab along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of user of a lab that can register for and use virtual machines within + * the lab. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, UserInner> beginUpdateAsync( @@ -1018,8 +1008,8 @@ private PollerFlux, UserInner> beginUpdateAsync( * @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 user of a lab that can register for and use virtual machines within the lab along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of user of a lab that can register for and use virtual machines within + * the lab. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, UserInner> beginUpdateAsync( @@ -1044,8 +1034,8 @@ private PollerFlux, UserInner> beginUpdateAsync( * @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 user of a lab that can register for and use virtual machines within the lab along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of user of a lab that can register for and use virtual machines within + * the lab. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, UserInner> beginUpdate( @@ -1065,8 +1055,8 @@ public SyncPoller, UserInner> beginUpdate( * @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 user of a lab that can register for and use virtual machines within the lab along with {@link Response} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of user of a lab that can register for and use virtual machines within + * the lab. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, UserInner> beginUpdate( @@ -1272,7 +1262,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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1295,7 +1285,7 @@ private PollerFlux, Void> beginDeleteAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1317,7 +1307,7 @@ private PollerFlux, Void> beginDeleteAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String labName, String username) { @@ -1335,7 +1325,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1546,7 +1536,7 @@ private Mono>> inviteWithResponseAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginInviteAsync( @@ -1570,7 +1560,7 @@ private PollerFlux, Void> beginInviteAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginInviteAsync( @@ -1594,7 +1584,7 @@ private PollerFlux, Void> beginInviteAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginInvite( @@ -1614,7 +1604,7 @@ public SyncPoller, Void> beginInvite( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginInvite( diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsersImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsersImpl.java index 1e5b8ca7555a..9a003cf29383 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsersImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsersImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.labservices.models.InviteBody; import com.azure.resourcemanager.labservices.models.User; import com.azure.resourcemanager.labservices.models.Users; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class UsersImpl implements Users { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(UsersImpl.class); private final UsersClient innerClient; @@ -79,7 +78,7 @@ public void invite(String resourceGroupName, String labName, String username, In public User getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -87,14 +86,14 @@ public User getById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); @@ -105,7 +104,7 @@ public User 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 @@ -113,14 +112,14 @@ public Response getByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); @@ -131,7 +130,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -139,14 +138,14 @@ public void deleteById(String id) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); @@ -157,7 +156,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -165,14 +164,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String labName = Utils.getValueFromIdByName(id, "labs"); if (labName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'labs'.", id))); } String username = Utils.getValueFromIdByName(id, "users"); if (username == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'users'.", id))); diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/VirtualMachinesClientImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/VirtualMachinesClientImpl.java index 76cf2340485f..4c87b8f98af1 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/VirtualMachinesClientImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/VirtualMachinesClientImpl.java @@ -28,7 +28,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.labservices.fluent.VirtualMachinesClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in VirtualMachinesClient. */ public final class VirtualMachinesClientImpl implements VirtualMachinesClient { - private final ClientLogger logger = new ClientLogger(VirtualMachinesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final VirtualMachinesService service; @@ -321,7 +318,7 @@ private Mono> listByLabSinglePageAsync( * @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 paged list of lab services virtual machines. + * @return paged list of lab services virtual machines as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLabAsync(String resourceGroupName, String labName, String filter) { @@ -339,7 +336,7 @@ private PagedFlux listByLabAsync(String resourceGroupName, * @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 paged list of lab services virtual machines. + * @return paged list of lab services virtual machines as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLabAsync(String resourceGroupName, String labName) { @@ -360,7 +357,7 @@ private PagedFlux listByLabAsync(String resourceGroupName, * @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 paged list of lab services virtual machines. + * @return paged list of lab services virtual machines as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLabAsync( @@ -379,7 +376,7 @@ private PagedFlux listByLabAsync( * @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 paged list of lab services virtual machines. + * @return paged list of lab services virtual machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByLab(String resourceGroupName, String labName) { @@ -398,7 +395,7 @@ public PagedIterable listByLab(String resourceGroupName, St * @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 paged list of lab services virtual machines. + * @return paged list of lab services virtual machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByLab( @@ -532,14 +529,7 @@ private Mono> getWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String labName, String virtualMachineName) { return getWithResponseAsync(resourceGroupName, labName, virtualMachineName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -701,7 +691,7 @@ private Mono>> startWithResponseAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync( @@ -725,7 +715,7 @@ private PollerFlux, Void> beginStartAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync( @@ -749,7 +739,7 @@ private PollerFlux, Void> beginStartAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart( @@ -769,7 +759,7 @@ public SyncPoller, Void> beginStart( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart( @@ -975,7 +965,7 @@ private Mono>> stopWithResponseAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( @@ -999,7 +989,7 @@ private PollerFlux, Void> beginStopAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( @@ -1023,7 +1013,7 @@ private PollerFlux, Void> beginStopAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop( @@ -1043,7 +1033,7 @@ public SyncPoller, Void> beginStop( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop( @@ -1251,7 +1241,7 @@ private Mono>> reimageWithResponseAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginReimageAsync( @@ -1277,7 +1267,7 @@ private PollerFlux, Void> beginReimageAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginReimageAsync( @@ -1302,7 +1292,7 @@ private PollerFlux, Void> beginReimageAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginReimage( @@ -1323,7 +1313,7 @@ public SyncPoller, Void> beginReimage( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginReimage( @@ -1533,7 +1523,7 @@ private Mono>> redeployWithResponseAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRedeployAsync( @@ -1558,7 +1548,7 @@ private PollerFlux, Void> beginRedeployAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRedeployAsync( @@ -1582,7 +1572,7 @@ private PollerFlux, Void> beginRedeployAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRedeploy( @@ -1602,7 +1592,7 @@ public SyncPoller, Void> beginRedeploy( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRedeploy( @@ -1823,7 +1813,7 @@ private Mono>> resetPasswordWithResponseAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginResetPasswordAsync( @@ -1849,7 +1839,7 @@ private PollerFlux, Void> beginResetPasswordAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginResetPasswordAsync( @@ -1874,7 +1864,7 @@ private PollerFlux, Void> beginResetPasswordAsync( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginResetPassword( @@ -1895,7 +1885,7 @@ public SyncPoller, Void> beginResetPassword( * @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 {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginResetPassword( diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/VirtualMachinesImpl.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/VirtualMachinesImpl.java index b6998cfb5ec5..c9f6d20b4d87 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/VirtualMachinesImpl.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/VirtualMachinesImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.labservices.models.ResetPasswordBody; import com.azure.resourcemanager.labservices.models.VirtualMachine; import com.azure.resourcemanager.labservices.models.VirtualMachines; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class VirtualMachinesImpl implements VirtualMachines { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachinesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(VirtualMachinesImpl.class); private final VirtualMachinesClient innerClient; diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ActionType.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ActionType.java index 5b64ac876510..142c2ba422cf 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ActionType.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ActionType.java @@ -24,7 +24,11 @@ public static ActionType fromString(String name) { return fromString(name, ActionType.class); } - /** @return known ActionType values. */ + /** + * Gets known ActionType values. + * + * @return known ActionType values. + */ public static Collection values() { return values(ActionType.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/AutoShutdownProfile.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/AutoShutdownProfile.java index 4ed699bbaf4a..73edb68fc79f 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/AutoShutdownProfile.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/AutoShutdownProfile.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; /** Profile for how to handle shutting down virtual machines. */ @Fluent public final class AutoShutdownProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoShutdownProfile.class); - /* * Whether shutdown on disconnect is enabled */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ConnectionProfile.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ConnectionProfile.java index a6d2ae482a95..3fba6d579028 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ConnectionProfile.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ConnectionProfile.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.labservices.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; /** Connection profile for how users connect to lab virtual machines. */ @Fluent public final class ConnectionProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectionProfile.class); - /* * The enabled access level for Web Access over SSH. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Credentials.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Credentials.java index f771f84b95d8..a65ec1186ed1 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Credentials.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Credentials.java @@ -6,14 +6,11 @@ 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; /** Credentials for a user on a lab VM. */ @Fluent public final class Credentials { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Credentials.class); - /* * The username to use when signing in to lab VMs. */ @@ -74,9 +71,11 @@ public Credentials withPassword(String password) { */ public void validate() { if (username() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property username in model Credentials")); } } + + private static final ClientLogger LOGGER = new ClientLogger(Credentials.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Image.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Image.java index b90c5af8656a..febad1c7e1ad 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Image.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Image.java @@ -151,6 +151,13 @@ public interface Image { */ EnableState enabledState(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.labservices.fluent.models.ImageInner object. * diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ImageReference.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ImageReference.java index 1af0ae7578b2..a8b85c7ef984 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ImageReference.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ImageReference.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.labservices.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; /** Image reference information. Used in the virtual machine profile. */ @Fluent public final class ImageReference { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ImageReference.class); - /* * Image resource ID */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ImageUpdate.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ImageUpdate.java index bc2c12d2b645..4eb717083b16 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ImageUpdate.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ImageUpdate.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.fluent.models.ImageUpdateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Lab services virtual machine image for updates. */ @Fluent public final class ImageUpdate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ImageUpdate.class); - /* * Image resource properties */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Images.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Images.java index 4bf6d4b5e604..2623af6fe500 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Images.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Images.java @@ -19,7 +19,7 @@ public interface Images { * @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 all images from galleries attached to a lab plan. + * @return all images from galleries attached to a lab plan as paginated response with {@link PagedIterable}. */ PagedIterable listByLabPlan(String resourceGroupName, String labPlanName); @@ -34,7 +34,7 @@ public interface Images { * @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 all images from galleries attached to a lab plan. + * @return all images from galleries attached to a lab plan as paginated response with {@link PagedIterable}. */ PagedIterable listByLabPlan(String resourceGroupName, String labPlanName, String filter, Context context); diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/InviteBody.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/InviteBody.java index 0e7f4aac474f..c407e000d963 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/InviteBody.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/InviteBody.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.labservices.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; /** Body for a user invite request. */ @Fluent public final class InviteBody { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InviteBody.class); - /* * Custom text for the invite email. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Lab.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Lab.java index abfde36b0d2d..a06d32e0fb7a 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Lab.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Lab.java @@ -151,6 +151,13 @@ public interface Lab { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.labservices.fluent.models.LabInner object. * diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabNetworkProfile.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabNetworkProfile.java index 59ac85fe3d45..586538d73a93 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabNetworkProfile.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabNetworkProfile.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.labservices.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; /** Profile for how to handle networking for Labs. */ @Fluent public final class LabNetworkProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabNetworkProfile.class); - /* * The external subnet resource id */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabPlan.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabPlan.java index a86ddfeb3a41..51b0abbb4c59 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabPlan.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabPlan.java @@ -132,6 +132,13 @@ public interface LabPlan { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.labservices.fluent.models.LabPlanInner object. * diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabPlanNetworkProfile.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabPlanNetworkProfile.java index 7be20f641234..2789ed5074f8 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabPlanNetworkProfile.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabPlanNetworkProfile.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.labservices.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; /** Profile for how to handle networking for Lab Plans. */ @Fluent public final class LabPlanNetworkProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabPlanNetworkProfile.class); - /* * The external subnet resource id */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabPlanUpdate.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabPlanUpdate.java index 070376a9c3fa..01f1408178fd 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabPlanUpdate.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabPlanUpdate.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.fluent.models.LabPlanUpdateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Contains lab configuration and default settings. This variant is used for PATCH. */ @Fluent public final class LabPlanUpdate extends TrackedResourceUpdate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabPlanUpdate.class); - /* * Lab plan resource update properties */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabPlans.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabPlans.java index 3688f6fbd16d..c4282b035f8f 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabPlans.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabPlans.java @@ -15,7 +15,7 @@ public interface LabPlans { * * @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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -27,7 +27,7 @@ public interface LabPlans { * @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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedIterable}. */ PagedIterable list(String filter, Context context); @@ -38,7 +38,7 @@ public interface LabPlans { * @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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -50,7 +50,7 @@ public interface LabPlans { * @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 paged list of lab plans. + * @return paged list of lab plans as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuCapabilities.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuCapabilities.java index 9b656fee01f2..9c06bcd1612d 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuCapabilities.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuCapabilities.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.labservices.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 array of capabilities of a lab services SKU. */ @Immutable public final class LabServicesSkuCapabilities { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabServicesSkuCapabilities.class); - /* * The name of the capability for a SKU. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuCapacity.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuCapacity.java index 3cc4caf9c7d2..50b35d6101d8 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuCapacity.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuCapacity.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.labservices.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 scale out/in options of the SKU. */ @Immutable public final class LabServicesSkuCapacity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabServicesSkuCapacity.class); - /* * The default capacity for this resource. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuCost.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuCost.java index 5c23ce7e9319..c1cd303ce33b 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuCost.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuCost.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.labservices.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 array of costs of a lab services SKU. */ @Immutable public final class LabServicesSkuCost { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabServicesSkuCost.class); - /* * The meter id. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuRestrictions.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuRestrictions.java index ca093c400699..5662d3a5fa92 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuRestrictions.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuRestrictions.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.labservices.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; import java.util.List; /** The restriction details. */ @Immutable public final class LabServicesSkuRestrictions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabServicesSkuRestrictions.class); - /* * The type of restriction. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuTier.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuTier.java index 67713ad39d90..cafb5ef888dd 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuTier.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabServicesSkuTier.java @@ -27,7 +27,11 @@ public static LabServicesSkuTier fromString(String name) { return fromString(name, LabServicesSkuTier.class); } - /** @return known LabServicesSkuTier values. */ + /** + * Gets known LabServicesSkuTier values. + * + * @return known LabServicesSkuTier values. + */ public static Collection values() { return values(LabServicesSkuTier.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabUpdate.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabUpdate.java index 5096140824f6..6b0a6893464c 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabUpdate.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/LabUpdate.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.fluent.models.LabUpdateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The lab resource for updates. */ @Fluent public final class LabUpdate extends TrackedResourceUpdate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LabUpdate.class); - /* * Lab resource properties */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Labs.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Labs.java index 125099f450ff..847362860588 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Labs.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Labs.java @@ -15,7 +15,7 @@ public interface Labs { * * @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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -27,7 +27,7 @@ public interface Labs { * @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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedIterable}. */ PagedIterable list(String filter, Context context); @@ -38,7 +38,7 @@ public interface Labs { * @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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -50,7 +50,7 @@ public interface Labs { * @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 paged list of labs. + * @return paged list of labs as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ListUsagesResult.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ListUsagesResult.java index b53f3bea911d..b0252ec181a4 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ListUsagesResult.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ListUsagesResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.fluent.models.UsageInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of Core Usages. */ @Immutable public final class ListUsagesResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ListUsagesResult.class); - /* * The array page of Usages. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/OperationDisplay.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/OperationDisplay.java index 9246e790087b..b25b252d2701 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/OperationDisplay.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/OperationDisplay.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.labservices.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; /** Localized display information for this particular operation. */ @Immutable public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * The localized friendly form of the resource provider name, e.g. * "Microsoft Monitoring Insights" or "Microsoft Compute". diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/OperationListResult.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/OperationListResult.java index 6634c72e53e4..06fb3d12970b 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/OperationListResult.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/OperationListResult.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,8 +15,6 @@ */ @Immutable public final class OperationListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResult.class); - /* * List of operations supported by the resource provider */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Operations.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Operations.java index 0e615a408143..fdee2e3bb320 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Operations.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Operations.java @@ -14,7 +14,8 @@ public interface Operations { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. */ PagedIterable list(); @@ -25,7 +26,8 @@ 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 a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Origin.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Origin.java index ce93018c75af..3dd19f7c7cf9 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Origin.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Origin.java @@ -30,7 +30,11 @@ public static Origin fromString(String name) { return fromString(name, Origin.class); } - /** @return known Origin values. */ + /** + * Gets known Origin values. + * + * @return known Origin values. + */ public static Collection values() { return values(Origin.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedImages.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedImages.java index e432ba3f3cd5..fff945f2e3fd 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedImages.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedImages.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.fluent.models.ImageInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Paged list of Lab services virtual machine images. */ @Immutable public final class PagedImages { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PagedImages.class); - /* * The array page of virtual machine images. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedLabPlans.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedLabPlans.java index dcff034630b7..99b396b97679 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedLabPlans.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedLabPlans.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.fluent.models.LabPlanInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Paged list of lab plans. */ @Immutable public final class PagedLabPlans { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PagedLabPlans.class); - /* * The array page of lab plans. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedLabServicesSkus.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedLabServicesSkus.java index 4242b873b0f8..e6eb15c96d14 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedLabServicesSkus.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedLabServicesSkus.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.fluent.models.LabServicesSkuInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Paged list of lab services skus. */ @Immutable public final class PagedLabServicesSkus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PagedLabServicesSkus.class); - /* * The array page of sku results. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedLabs.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedLabs.java index 55c7f15e3c7b..76a5c6efd786 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedLabs.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedLabs.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.fluent.models.LabInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Paged list of labs. */ @Immutable public final class PagedLabs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PagedLabs.class); - /* * The array page of lab results. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedSchedules.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedSchedules.java index 06530cb89b91..e8c17b84fe77 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedSchedules.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedSchedules.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.fluent.models.ScheduleInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Paged list of schedules. */ @Immutable public final class PagedSchedules { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PagedSchedules.class); - /* * The array page of schedule results. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedUsers.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedUsers.java index 5fa61d0f1a93..132a00781658 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedUsers.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedUsers.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.fluent.models.UserInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Paged list of users. */ @Immutable public final class PagedUsers { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PagedUsers.class); - /* * The array page of user results. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedVirtualMachines.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedVirtualMachines.java index 9f6a4cd97ddc..0c719d67badd 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedVirtualMachines.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/PagedVirtualMachines.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.fluent.models.VirtualMachineInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Paged list of lab services virtual machines. */ @Immutable public final class PagedVirtualMachines { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PagedVirtualMachines.class); - /* * The array page of virtual machine results. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/RecurrencePattern.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/RecurrencePattern.java index e9359d6b1e66..26acca223875 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/RecurrencePattern.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/RecurrencePattern.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.LocalDate; import java.util.List; @@ -14,8 +13,6 @@ /** Recurrence pattern of a lab schedule. */ @Fluent public final class RecurrencePattern { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RecurrencePattern.class); - /* * The frequency of the recurrence. */ @@ -132,15 +129,17 @@ public RecurrencePattern withExpirationDate(LocalDate expirationDate) { */ public void validate() { if (frequency() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property frequency in model RecurrencePattern")); } if (expirationDate() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property expirationDate in model RecurrencePattern")); } } + + private static final ClientLogger LOGGER = new ClientLogger(RecurrencePattern.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ResetPasswordBody.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ResetPasswordBody.java index b7cb2ec1e4f5..8a21a25ab564 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ResetPasswordBody.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ResetPasswordBody.java @@ -6,14 +6,11 @@ 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; /** Body of a reset password request. */ @Fluent public final class ResetPasswordBody { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResetPasswordBody.class); - /* * The user whose password is being reset */ @@ -73,14 +70,16 @@ public ResetPasswordBody withPassword(String password) { */ public void validate() { if (username() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property username in model ResetPasswordBody")); } if (password() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property password in model ResetPasswordBody")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ResetPasswordBody.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/RestrictionReasonCode.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/RestrictionReasonCode.java index 6a170889a862..853d0c253ca8 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/RestrictionReasonCode.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/RestrictionReasonCode.java @@ -28,7 +28,11 @@ public static RestrictionReasonCode fromString(String name) { return fromString(name, RestrictionReasonCode.class); } - /** @return known RestrictionReasonCode values. */ + /** + * Gets known RestrictionReasonCode values. + * + * @return known RestrictionReasonCode values. + */ public static Collection values() { return values(RestrictionReasonCode.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/RestrictionType.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/RestrictionType.java index e3a864be3a6e..375cad947b9b 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/RestrictionType.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/RestrictionType.java @@ -24,7 +24,11 @@ public static RestrictionType fromString(String name) { return fromString(name, RestrictionType.class); } - /** @return known RestrictionType values. */ + /** + * Gets known RestrictionType values. + * + * @return known RestrictionType values. + */ public static Collection values() { return values(RestrictionType.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/RosterProfile.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/RosterProfile.java index df5ea07c05d5..27d5c6392cbc 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/RosterProfile.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/RosterProfile.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The lab user list management profile. */ @Fluent public final class RosterProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RosterProfile.class); - /* * The AAD group ID which this lab roster is populated from. Having this * set enables AAD sync mode. diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/SaveImageBody.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/SaveImageBody.java index 9899a62a729c..be165617027a 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/SaveImageBody.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/SaveImageBody.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.labservices.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; /** Body for the save image POST. */ @Fluent public final class SaveImageBody { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SaveImageBody.class); - /* * The name for the image we create. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ScaleType.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ScaleType.java index 36ae545e6eb3..8d9a8f67ba66 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ScaleType.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ScaleType.java @@ -30,7 +30,11 @@ public static ScaleType fromString(String name) { return fromString(name, ScaleType.class); } - /** @return known ScaleType values. */ + /** + * Gets known ScaleType values. + * + * @return known ScaleType values. + */ public static Collection values() { return values(ScaleType.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Schedule.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Schedule.java index bf580cfa5b96..21050da55ccb 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Schedule.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Schedule.java @@ -83,6 +83,13 @@ public interface Schedule { */ String notes(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.labservices.fluent.models.ScheduleInner object. * diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ScheduleUpdate.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ScheduleUpdate.java index 7398ea1c45c6..17294d4956a4 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ScheduleUpdate.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/ScheduleUpdate.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.fluent.models.ScheduleUpdateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Schedule for automatically turning virtual machines in a lab on and off at specified times. Used for updates. */ @Fluent public final class ScheduleUpdate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduleUpdate.class); - /* * Schedule resource properties */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Schedules.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Schedules.java index 07476f13dc43..b6bb595a0b08 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Schedules.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Schedules.java @@ -19,7 +19,7 @@ public interface Schedules { * @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 paged list of schedules. + * @return paged list of schedules as paginated response with {@link PagedIterable}. */ PagedIterable listByLab(String resourceGroupName, String labName); @@ -34,7 +34,7 @@ public interface Schedules { * @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 paged list of schedules. + * @return paged list of schedules as paginated response with {@link PagedIterable}. */ PagedIterable listByLab(String resourceGroupName, String labName, String filter, Context context); diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/SecurityProfile.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/SecurityProfile.java index 765a1b4a9347..fb242e5d0189 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/SecurityProfile.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/SecurityProfile.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The lab security profile. */ @Fluent public final class SecurityProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SecurityProfile.class); - /* * The registration code for the lab. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Sku.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Sku.java index 1f57ad384b72..a92470a07337 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Sku.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Sku.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The resource model definition representing SKU. */ @Fluent public final class Sku { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class); - /* * The name of the SKU. Ex - P3. It is typically a letter+number code */ @@ -164,8 +161,10 @@ public Sku withCapacity(Integer capacity) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Sku")); } } + + private static final ClientLogger LOGGER = new ClientLogger(Sku.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Skus.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Skus.java index 59fd1249ad23..bf04c4fd13e4 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Skus.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Skus.java @@ -14,7 +14,7 @@ public interface Skus { * * @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 paged list of lab services skus. + * @return paged list of lab services skus as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -26,7 +26,7 @@ public interface Skus { * @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 paged list of lab services skus. + * @return paged list of lab services skus as paginated response with {@link PagedIterable}. */ PagedIterable list(String filter, Context context); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/SupportInfo.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/SupportInfo.java index 29f6f0a4c044..0b2a41f0415e 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/SupportInfo.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/SupportInfo.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.labservices.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; /** Support contact information and instructions. */ @Fluent public final class SupportInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SupportInfo.class); - /* * Support web address. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/TrackedResourceUpdate.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/TrackedResourceUpdate.java index 6349b73f01d6..93bab89f6def 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/TrackedResourceUpdate.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/TrackedResourceUpdate.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.labservices.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; /** Base tracked resource type for all PATCH updates. */ @Fluent public class TrackedResourceUpdate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TrackedResourceUpdate.class); - /* * Resource tags. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/UsageName.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/UsageName.java index 5c158a0651a1..fc2a7a5b24ec 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/UsageName.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/UsageName.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The Usage Names. */ @Fluent public final class UsageName { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageName.class); - /* * The localized name of the resource. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/UsageUnit.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/UsageUnit.java index 7ad595b0d62f..23b370aac62b 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/UsageUnit.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/UsageUnit.java @@ -24,7 +24,11 @@ public static UsageUnit fromString(String name) { return fromString(name, UsageUnit.class); } - /** @return known UsageUnit values. */ + /** + * Gets known UsageUnit values. + * + * @return known UsageUnit values. + */ public static Collection values() { return values(UsageUnit.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Usages.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Usages.java index 35928cffc7c3..d618185075b1 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Usages.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Usages.java @@ -16,7 +16,7 @@ public interface Usages { * @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 Core Usages. + * @return list of Core Usages as paginated response with {@link PagedIterable}. */ PagedIterable listByLocation(String location); @@ -29,7 +29,7 @@ public interface Usages { * @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 Core Usages. + * @return list of Core Usages as paginated response with {@link PagedIterable}. */ PagedIterable listByLocation(String location, String filter, Context context); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/User.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/User.java index e6c7246ea10b..e8402bb96ba1 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/User.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/User.java @@ -97,6 +97,13 @@ public interface User { */ Duration additionalUsageQuota(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.labservices.fluent.models.UserInner object. * diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/UserUpdate.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/UserUpdate.java index bf5aacfa6160..c3b86e9ea74e 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/UserUpdate.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/UserUpdate.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.labservices.fluent.models.UserUpdateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; /** User of a lab that can register for and use virtual machines within the lab. Used for updates. */ @Fluent public final class UserUpdate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserUpdate.class); - /* * User resource properties */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Users.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Users.java index a766aa8ad88c..4efd64d208a4 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Users.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/Users.java @@ -19,7 +19,7 @@ public interface Users { * @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 paged list of users. + * @return paged list of users as paginated response with {@link PagedIterable}. */ PagedIterable listByLab(String resourceGroupName, String labName); @@ -34,7 +34,7 @@ public interface Users { * @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 paged list of users. + * @return paged list of users as paginated response with {@link PagedIterable}. */ PagedIterable listByLab(String resourceGroupName, String labName, String filter, Context context); diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/VirtualMachineAdditionalCapabilities.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/VirtualMachineAdditionalCapabilities.java index 60440ad49e53..e9f677b42d1d 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/VirtualMachineAdditionalCapabilities.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/VirtualMachineAdditionalCapabilities.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.labservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The additional capabilities for a lab VM. */ @Fluent public final class VirtualMachineAdditionalCapabilities { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachineAdditionalCapabilities.class); - /* * Flag to pre-install dedicated GPU drivers. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/VirtualMachineConnectionProfile.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/VirtualMachineConnectionProfile.java index 01e1d968a5bb..c3db35057a60 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/VirtualMachineConnectionProfile.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/VirtualMachineConnectionProfile.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.labservices.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 connection information for the virtual machine. */ @Immutable public final class VirtualMachineConnectionProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachineConnectionProfile.class); - /* * The private IP address of the virtual machine. */ diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/VirtualMachineProfile.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/VirtualMachineProfile.java index 14a10442eca0..4c60d15917c6 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/VirtualMachineProfile.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/VirtualMachineProfile.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.time.Duration; /** The base virtual machine configuration for a lab. */ @Fluent public final class VirtualMachineProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachineProfile.class); - /* * Indicates what lab virtual machines are created from. */ @@ -250,13 +247,13 @@ public VirtualMachineProfile withNonAdminUser(Credentials nonAdminUser) { */ public void validate() { if (createOption() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property createOption in model VirtualMachineProfile")); } if (imageReference() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property imageReference in model VirtualMachineProfile")); @@ -264,7 +261,7 @@ public void validate() { imageReference().validate(); } if (sku() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property sku in model VirtualMachineProfile")); } else { @@ -274,13 +271,13 @@ public void validate() { additionalCapabilities().validate(); } if (usageQuota() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property usageQuota in model VirtualMachineProfile")); } if (adminUser() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property adminUser in model VirtualMachineProfile")); } else { @@ -290,4 +287,6 @@ public void validate() { nonAdminUser().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(VirtualMachineProfile.class); } diff --git a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/VirtualMachines.java b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/VirtualMachines.java index 0a5e33a46726..b8c7c0678e57 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/VirtualMachines.java +++ b/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/VirtualMachines.java @@ -19,7 +19,7 @@ public interface VirtualMachines { * @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 paged list of lab services virtual machines. + * @return paged list of lab services virtual machines as paginated response with {@link PagedIterable}. */ PagedIterable listByLab(String resourceGroupName, String labName); @@ -34,7 +34,7 @@ public interface VirtualMachines { * @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 paged list of lab services virtual machines. + * @return paged list of lab services virtual machines as paginated response with {@link PagedIterable}. */ PagedIterable listByLab(String resourceGroupName, String labName, String filter, Context context);