diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md index fc476f67b51b6..3600eca8e1159 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2021-06-28) +- Azure Resource Manager ApplicationInsights client library for Java. This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. Composite Swagger for Application Insights Management Client. Package tag package-2020-11-only. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.1 (2021-04-20) diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md index a81755a5f6f36..e95959b5af909 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md @@ -2,7 +2,7 @@ Azure Resource Manager ApplicationInsights client library for Java. -This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. Composite Swagger for Application Insights Management Client. Package tag package-2020-10-20. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. Composite Swagger for Application Insights Management Client. Package tag package-2020-11-only. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-applicationinsights - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -74,13 +74,15 @@ See [API design][design] for general introduction on design and key concepts on ## Examples + + ## Troubleshooting ## Next steps ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/master/CONTRIBUTING.md). 1. Fork it 1. Create your feature branch (`git checkout -b my-new-feature`) @@ -93,7 +95,7 @@ For details on contributing to this repository, see the [contributing guide](htt [docs]: https://azure.github.io/azure-sdk-for-java/ [jdk]: https://docs.microsoft.com/java/azure/jdk/ [azure_subscription]: https://azure.microsoft.com/free/ -[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity -[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty -[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md -[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity +[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core-http-netty +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/DESIGN.md diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml index 85f137548ba4b..a3e171a9500f8 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml @@ -1,67 +1,86 @@ - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + - com.azure.resourcemanager - azure-resourcemanager-applicationinsights - 1.0.0-beta.2 - jar + com.azure.resourcemanager + azure-resourcemanager-applicationinsights + 1.0.0-beta.2 + jar - Microsoft Azure SDK for ApplicationInsights Management - This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Composite Swagger for Application Insights Management Client. Package tag package-2020-10-20. - https://github.com/Azure/azure-sdk-for-java + Microsoft Azure SDK for ApplicationInsights Management + This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Composite Swagger for Application Insights Management Client. Package tag package-2020-11-only. + https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + - - https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - microsoft - Microsoft - - - - UTF-8 - - - - - com.azure - azure-core - 1.17.0 - - - com.azure - azure-core-management - 1.3.0 - - - - - - org.jacoco - jacoco-maven-plugin - 0.8.5 - - true - - - - + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + + + + + com.azure + azure-core + 1.17.0 + + + com.azure + azure-core-management + 1.3.0 + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.5 + + true + + + + org.revapi + revapi-maven-plugin + 0.11.2 + + + + + java.method.addedToInterface + + + true + .* + com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)* + + + + + + + diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/ApplicationInsightsManager.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/ApplicationInsightsManager.java index bd7b5e4889807..980abef3fed51 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/ApplicationInsightsManager.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/ApplicationInsightsManager.java @@ -9,7 +9,6 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -17,45 +16,14 @@ import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.applicationinsights.fluent.ApplicationInsightsManagementClient; -import com.azure.resourcemanager.applicationinsights.implementation.AnalyticsItemsImpl; -import com.azure.resourcemanager.applicationinsights.implementation.AnnotationsImpl; -import com.azure.resourcemanager.applicationinsights.implementation.ApiKeysImpl; import com.azure.resourcemanager.applicationinsights.implementation.ApplicationInsightsManagementClientBuilder; -import com.azure.resourcemanager.applicationinsights.implementation.ComponentAvailableFeaturesImpl; -import com.azure.resourcemanager.applicationinsights.implementation.ComponentCurrentBillingFeaturesImpl; -import com.azure.resourcemanager.applicationinsights.implementation.ComponentFeatureCapabilitiesImpl; -import com.azure.resourcemanager.applicationinsights.implementation.ComponentQuotaStatusImpl; -import com.azure.resourcemanager.applicationinsights.implementation.ComponentsImpl; -import com.azure.resourcemanager.applicationinsights.implementation.ExportConfigurationsImpl; -import com.azure.resourcemanager.applicationinsights.implementation.FavoritesImpl; -import com.azure.resourcemanager.applicationinsights.implementation.MyWorkbooksImpl; -import com.azure.resourcemanager.applicationinsights.implementation.OperationsImpl; -import com.azure.resourcemanager.applicationinsights.implementation.ProactiveDetectionConfigurationsImpl; -import com.azure.resourcemanager.applicationinsights.implementation.WebTestLocationsImpl; -import com.azure.resourcemanager.applicationinsights.implementation.WebTestsImpl; -import com.azure.resourcemanager.applicationinsights.implementation.WorkItemConfigurationsImpl; -import com.azure.resourcemanager.applicationinsights.implementation.WorkbooksImpl; -import com.azure.resourcemanager.applicationinsights.models.AnalyticsItems; -import com.azure.resourcemanager.applicationinsights.models.Annotations; -import com.azure.resourcemanager.applicationinsights.models.ApiKeys; -import com.azure.resourcemanager.applicationinsights.models.ComponentAvailableFeatures; -import com.azure.resourcemanager.applicationinsights.models.ComponentCurrentBillingFeatures; -import com.azure.resourcemanager.applicationinsights.models.ComponentFeatureCapabilities; -import com.azure.resourcemanager.applicationinsights.models.ComponentQuotaStatus; -import com.azure.resourcemanager.applicationinsights.models.Components; -import com.azure.resourcemanager.applicationinsights.models.ExportConfigurations; -import com.azure.resourcemanager.applicationinsights.models.Favorites; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbooks; -import com.azure.resourcemanager.applicationinsights.models.Operations; -import com.azure.resourcemanager.applicationinsights.models.ProactiveDetectionConfigurations; -import com.azure.resourcemanager.applicationinsights.models.WebTestLocations; -import com.azure.resourcemanager.applicationinsights.models.WebTests; -import com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurations; -import com.azure.resourcemanager.applicationinsights.models.Workbooks; +import com.azure.resourcemanager.applicationinsights.implementation.WorkbookTemplatesImpl; +import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplates; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -64,39 +32,7 @@ /** Entry point to ApplicationInsightsManager. Composite Swagger for Application Insights Management Client. */ public final class ApplicationInsightsManager { - private AnalyticsItems analyticsItems; - - private Annotations annotations; - - private ApiKeys apiKeys; - - private ExportConfigurations exportConfigurations; - - private ComponentCurrentBillingFeatures componentCurrentBillingFeatures; - - private ComponentQuotaStatus componentQuotaStatus; - - private ComponentFeatureCapabilities componentFeatureCapabilities; - - private ComponentAvailableFeatures componentAvailableFeatures; - - private ProactiveDetectionConfigurations proactiveDetectionConfigurations; - - private Components components; - - private WorkItemConfigurations workItemConfigurations; - - private Favorites favorites; - - private WebTestLocations webTestLocations; - - private WebTests webTests; - - private MyWorkbooks myWorkbooks; - - private Workbooks workbooks; - - private Operations operations; + private WorkbookTemplates workbookTemplates; private final ApplicationInsightsManagementClient clientObject; @@ -141,6 +77,7 @@ public static final class Configurable { private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; private Duration defaultPollInterval; @@ -180,6 +117,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) { return this; } + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + /** * Sets the retry policy to the HTTP pipeline. * @@ -236,6 +184,9 @@ public ApplicationInsightsManager authenticate(TokenCredential credential, Azure userAgentBuilder.append(" (auto-generated)"); } + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } if (retryPolicy == null) { retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); } @@ -245,10 +196,7 @@ public ApplicationInsightsManager authenticate(TokenCredential credential, Azure HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); @@ -261,145 +209,12 @@ public ApplicationInsightsManager authenticate(TokenCredential credential, Azure } } - /** @return Resource collection API of AnalyticsItems. */ - public AnalyticsItems analyticsItems() { - if (this.analyticsItems == null) { - this.analyticsItems = new AnalyticsItemsImpl(clientObject.getAnalyticsItems(), this); - } - return analyticsItems; - } - - /** @return Resource collection API of Annotations. */ - public Annotations annotations() { - if (this.annotations == null) { - this.annotations = new AnnotationsImpl(clientObject.getAnnotations(), this); - } - return annotations; - } - - /** @return Resource collection API of ApiKeys. */ - public ApiKeys apiKeys() { - if (this.apiKeys == null) { - this.apiKeys = new ApiKeysImpl(clientObject.getApiKeys(), this); - } - return apiKeys; - } - - /** @return Resource collection API of ExportConfigurations. */ - public ExportConfigurations exportConfigurations() { - if (this.exportConfigurations == null) { - this.exportConfigurations = new ExportConfigurationsImpl(clientObject.getExportConfigurations(), this); - } - return exportConfigurations; - } - - /** @return Resource collection API of ComponentCurrentBillingFeatures. */ - public ComponentCurrentBillingFeatures componentCurrentBillingFeatures() { - if (this.componentCurrentBillingFeatures == null) { - this.componentCurrentBillingFeatures = - new ComponentCurrentBillingFeaturesImpl(clientObject.getComponentCurrentBillingFeatures(), this); - } - return componentCurrentBillingFeatures; - } - - /** @return Resource collection API of ComponentQuotaStatus. */ - public ComponentQuotaStatus componentQuotaStatus() { - if (this.componentQuotaStatus == null) { - this.componentQuotaStatus = new ComponentQuotaStatusImpl(clientObject.getComponentQuotaStatus(), this); - } - return componentQuotaStatus; - } - - /** @return Resource collection API of ComponentFeatureCapabilities. */ - public ComponentFeatureCapabilities componentFeatureCapabilities() { - if (this.componentFeatureCapabilities == null) { - this.componentFeatureCapabilities = - new ComponentFeatureCapabilitiesImpl(clientObject.getComponentFeatureCapabilities(), this); - } - return componentFeatureCapabilities; - } - - /** @return Resource collection API of ComponentAvailableFeatures. */ - public ComponentAvailableFeatures componentAvailableFeatures() { - if (this.componentAvailableFeatures == null) { - this.componentAvailableFeatures = - new ComponentAvailableFeaturesImpl(clientObject.getComponentAvailableFeatures(), this); - } - return componentAvailableFeatures; - } - - /** @return Resource collection API of ProactiveDetectionConfigurations. */ - public ProactiveDetectionConfigurations proactiveDetectionConfigurations() { - if (this.proactiveDetectionConfigurations == null) { - this.proactiveDetectionConfigurations = - new ProactiveDetectionConfigurationsImpl(clientObject.getProactiveDetectionConfigurations(), this); - } - return proactiveDetectionConfigurations; - } - - /** @return Resource collection API of Components. */ - public Components components() { - if (this.components == null) { - this.components = new ComponentsImpl(clientObject.getComponents(), this); - } - return components; - } - - /** @return Resource collection API of WorkItemConfigurations. */ - public WorkItemConfigurations workItemConfigurations() { - if (this.workItemConfigurations == null) { - this.workItemConfigurations = - new WorkItemConfigurationsImpl(clientObject.getWorkItemConfigurations(), this); - } - return workItemConfigurations; - } - - /** @return Resource collection API of Favorites. */ - public Favorites favorites() { - if (this.favorites == null) { - this.favorites = new FavoritesImpl(clientObject.getFavorites(), this); - } - return favorites; - } - - /** @return Resource collection API of WebTestLocations. */ - public WebTestLocations webTestLocations() { - if (this.webTestLocations == null) { - this.webTestLocations = new WebTestLocationsImpl(clientObject.getWebTestLocations(), this); - } - return webTestLocations; - } - - /** @return Resource collection API of WebTests. */ - public WebTests webTests() { - if (this.webTests == null) { - this.webTests = new WebTestsImpl(clientObject.getWebTests(), this); - } - return webTests; - } - - /** @return Resource collection API of MyWorkbooks. */ - public MyWorkbooks myWorkbooks() { - if (this.myWorkbooks == null) { - this.myWorkbooks = new MyWorkbooksImpl(clientObject.getMyWorkbooks(), this); - } - return myWorkbooks; - } - - /** @return Resource collection API of Workbooks. */ - public Workbooks workbooks() { - if (this.workbooks == null) { - this.workbooks = new WorkbooksImpl(clientObject.getWorkbooks(), this); - } - return workbooks; - } - - /** @return Resource collection API of Operations. */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); + /** @return Resource collection API of WorkbookTemplates. */ + public WorkbookTemplates workbookTemplates() { + if (this.workbookTemplates == null) { + this.workbookTemplates = new WorkbookTemplatesImpl(clientObject.getWorkbookTemplates(), this); } - return operations; + return workbookTemplates; } /** diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnalyticsItemsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnalyticsItemsClient.java deleted file mode 100644 index 385906ad5027c..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnalyticsItemsClient.java +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAnalyticsItemInner; -import com.azure.resourcemanager.applicationinsights.models.ItemScope; -import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; -import com.azure.resourcemanager.applicationinsights.models.ItemTypeParameter; -import java.util.List; - -/** An instance of this class provides access to all the operations defined in AnalyticsItemsClient. */ -public interface AnalyticsItemsClient { - /** - * Gets a list of Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @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 Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - List list( - String resourceGroupName, String resourceName, ItemScopePath scopePath); - - /** - * Gets a list of Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param scope Enum indicating if this item definition is owned by a specific user or is shared between all users - * with access to the Application Insights component. - * @param type Enum indicating the type of the Analytics item. - * @param includeContent Flag indicating whether or not to return the content of each applicable item. If false, - * only return the item information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response> listWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ItemScope scope, - ItemTypeParameter type, - Boolean includeContent, - Context context); - - /** - * Gets a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @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 specific Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentAnalyticsItemInner get( - String resourceGroupName, String resourceName, ItemScopePath scopePath); - - /** - * Gets a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param id The Id of a specific item defined in the Application Insights component. - * @param name The name of a specific item defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context); - - /** - * Adds or Updates a specific Analytics Item within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param itemProperties Properties that need to be specified to create a new item and add it to an Application - * Insights component. - * @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 properties that define an Analytics item that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentAnalyticsItemInner put( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties); - - /** - * Adds or Updates a specific Analytics Item within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param itemProperties Properties that need to be specified to create a new item and add it to an Application - * Insights component. - * @param overrideItem Flag indicating whether or not to force save an item. This allows overriding an item if it - * already exists. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define an Analytics item that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response putWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties, - Boolean overrideItem, - Context context); - - /** - * Deletes a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, ItemScopePath scopePath); - - /** - * Deletes a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param id The Id of a specific item defined in the Application Insights component. - * @param name The name of a specific item defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnnotationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnnotationsClient.java deleted file mode 100644 index a021abd749630..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnnotationsClient.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner; -import java.util.List; - -/** An instance of this class provides access to all the operations defined in AnnotationsClient. */ -public interface AnnotationsClient { - /** - * Gets the list of annotations for a component for given time range. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param start The start time to query from for annotations, cannot be older than 90 days from current date. - * @param end The end time to query for annotations. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of annotations for a component for given time range. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName, String start, String end); - - /** - * Gets the list of annotations for a component for given time range. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param start The start time to query from for annotations, cannot be older than 90 days from current date. - * @param end The end time to query for annotations. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of annotations for a component for given time range. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String resourceName, String start, String end, Context context); - - /** - * Create an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationProperties Properties that need to be specified to create an annotation of a Application - * Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of Annotation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - List create(String resourceGroupName, String resourceName, AnnotationInner annotationProperties); - - /** - * Create an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationProperties Properties that need to be specified to create an annotation of a Application - * Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of Annotation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response> createWithResponse( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context); - - /** - * Delete an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String annotationId); - - /** - * Delete an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context); - - /** - * Get the annotation for given id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the annotation for given id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - List get(String resourceGroupName, String resourceName, String annotationId); - - /** - * Get the annotation for given id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the annotation for given id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response> getWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApplicationInsightsManagementClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApplicationInsightsManagementClient.java index 575ecdd9abe75..da027f21fd2fb 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApplicationInsightsManagementClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApplicationInsightsManagementClient.java @@ -23,6 +23,13 @@ public interface ApplicationInsightsManagementClient { */ String getEndpoint(); + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + /** * Gets The HTTP pipeline to send requests through. * @@ -38,121 +45,9 @@ public interface ApplicationInsightsManagementClient { Duration getDefaultPollInterval(); /** - * Gets the AnalyticsItemsClient object to access its operations. - * - * @return the AnalyticsItemsClient object. - */ - AnalyticsItemsClient getAnalyticsItems(); - - /** - * Gets the AnnotationsClient object to access its operations. - * - * @return the AnnotationsClient object. - */ - AnnotationsClient getAnnotations(); - - /** - * Gets the ApiKeysClient object to access its operations. - * - * @return the ApiKeysClient object. - */ - ApiKeysClient getApiKeys(); - - /** - * Gets the ExportConfigurationsClient object to access its operations. - * - * @return the ExportConfigurationsClient object. - */ - ExportConfigurationsClient getExportConfigurations(); - - /** - * Gets the ComponentCurrentBillingFeaturesClient object to access its operations. - * - * @return the ComponentCurrentBillingFeaturesClient object. - */ - ComponentCurrentBillingFeaturesClient getComponentCurrentBillingFeatures(); - - /** - * Gets the ComponentQuotaStatusClient object to access its operations. - * - * @return the ComponentQuotaStatusClient object. - */ - ComponentQuotaStatusClient getComponentQuotaStatus(); - - /** - * Gets the ComponentFeatureCapabilitiesClient object to access its operations. - * - * @return the ComponentFeatureCapabilitiesClient object. - */ - ComponentFeatureCapabilitiesClient getComponentFeatureCapabilities(); - - /** - * Gets the ComponentAvailableFeaturesClient object to access its operations. - * - * @return the ComponentAvailableFeaturesClient object. - */ - ComponentAvailableFeaturesClient getComponentAvailableFeatures(); - - /** - * Gets the ProactiveDetectionConfigurationsClient object to access its operations. - * - * @return the ProactiveDetectionConfigurationsClient object. - */ - ProactiveDetectionConfigurationsClient getProactiveDetectionConfigurations(); - - /** - * Gets the ComponentsClient object to access its operations. - * - * @return the ComponentsClient object. - */ - ComponentsClient getComponents(); - - /** - * Gets the WorkItemConfigurationsClient object to access its operations. - * - * @return the WorkItemConfigurationsClient object. - */ - WorkItemConfigurationsClient getWorkItemConfigurations(); - - /** - * Gets the FavoritesClient object to access its operations. - * - * @return the FavoritesClient object. - */ - FavoritesClient getFavorites(); - - /** - * Gets the WebTestLocationsClient object to access its operations. - * - * @return the WebTestLocationsClient object. - */ - WebTestLocationsClient getWebTestLocations(); - - /** - * Gets the WebTestsClient object to access its operations. - * - * @return the WebTestsClient object. - */ - WebTestsClient getWebTests(); - - /** - * Gets the MyWorkbooksClient object to access its operations. - * - * @return the MyWorkbooksClient object. - */ - MyWorkbooksClient getMyWorkbooks(); - - /** - * Gets the WorkbooksClient object to access its operations. - * - * @return the WorkbooksClient object. - */ - WorkbooksClient getWorkbooks(); - - /** - * Gets the OperationsClient object to access its operations. + * Gets the WorkbookTemplatesClient object to access its operations. * - * @return the OperationsClient object. + * @return the WorkbookTemplatesClient object. */ - OperationsClient getOperations(); + WorkbookTemplatesClient getWorkbookTemplates(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentAvailableFeaturesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentAvailableFeaturesClient.java deleted file mode 100644 index 02ca7155752e3..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentAvailableFeaturesClient.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAvailableFeaturesInner; - -/** An instance of this class provides access to all the operations defined in ComponentAvailableFeaturesClient. */ -public interface ComponentAvailableFeaturesClient { - /** - * Returns all available features of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component available features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentAvailableFeaturesInner get(String resourceGroupName, String resourceName); - - /** - * Returns all available features of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component available features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentCurrentBillingFeaturesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentCurrentBillingFeaturesClient.java deleted file mode 100644 index 502ad36166abc..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentCurrentBillingFeaturesClient.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner; - -/** An instance of this class provides access to all the operations defined in ComponentCurrentBillingFeaturesClient. */ -public interface ComponentCurrentBillingFeaturesClient { - /** - * Returns current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component billing features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentBillingFeaturesInner get(String resourceGroupName, String resourceName); - - /** - * Returns current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component billing features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Update current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param billingFeaturesProperties Properties that need to be specified to update billing features for an - * Application Insights component. - * @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 an Application Insights component billing features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentBillingFeaturesInner update( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties); - - /** - * Update current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param billingFeaturesProperties Properties that need to be specified to update billing features for an - * Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component billing features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, - Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentFeatureCapabilitiesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentFeatureCapabilitiesClient.java deleted file mode 100644 index 19a4b7f52b15b..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentFeatureCapabilitiesClient.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFeatureCapabilitiesInner; - -/** An instance of this class provides access to all the operations defined in ComponentFeatureCapabilitiesClient. */ -public interface ComponentFeatureCapabilitiesClient { - /** - * Returns feature capabilities of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component feature capabilities. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentFeatureCapabilitiesInner get(String resourceGroupName, String resourceName); - - /** - * Returns feature capabilities of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component feature capabilities. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentQuotaStatusClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentQuotaStatusClient.java deleted file mode 100644 index 155f06636f9b3..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentQuotaStatusClient.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentQuotaStatusInner; - -/** An instance of this class provides access to all the operations defined in ComponentQuotaStatusClient. */ -public interface ComponentQuotaStatusClient { - /** - * Returns daily data volume cap (quota) status for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component daily data volume cap status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentQuotaStatusInner get(String resourceGroupName, String resourceName); - - /** - * Returns daily data volume cap (quota) status for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component daily data volume cap status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentsClient.java deleted file mode 100644 index 9cf285362693f..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentsClient.java +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentInner; -import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeResponseInner; -import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeStatusResponseInner; -import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeBody; -import com.azure.resourcemanager.applicationinsights.models.TagsResource; - -/** An instance of this class provides access to all the operations defined in ComponentsClient. */ -public interface ComponentsClient { - /** - * Gets a list of all Application Insights components within a subscription. - * - * @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 all Application Insights components within a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Gets a list of all Application Insights components within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Application Insights components within a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Gets a list of Application Insights components within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Application Insights components within a resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Gets a list of Application Insights components within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Application Insights components within a resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Deletes an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName); - - /** - * Deletes an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); - - /** - * Returns an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentInner getByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Returns an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Creates (or updates) an Application Insights component. Note: You cannot specify a different value for - * InstrumentationKey nor AppId in the Put operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param insightProperties Properties that need to be specified to create an Application Insights component. - * @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 an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentInner createOrUpdate( - String resourceGroupName, String resourceName, ApplicationInsightsComponentInner insightProperties); - - /** - * Creates (or updates) an Application Insights component. Note: You cannot specify a different value for - * InstrumentationKey nor AppId in the Put operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param insightProperties Properties that need to be specified to create an Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentInner insightProperties, - Context context); - - /** - * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param componentTags Updated tag information to set into the component instance. - * @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 an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentInner updateTags( - String resourceGroupName, String resourceName, TagsResource componentTags); - - /** - * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param componentTags Updated tag information to set into the component instance. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateTagsWithResponse( - String resourceGroupName, String resourceName, TagsResource componentTags, Context context); - - /** - * Purges data in an Application Insights component by a set of user-defined filters. - * - *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch - * the execution of purge requests by sending a single command whose predicate includes all user identities that - * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param body Describes the body of a request to purge data in a single table of an Application Insights component. - * @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 response containing operationId for a specific purge action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentPurgeResponseInner purge(String resourceGroupName, String resourceName, ComponentPurgeBody body); - - /** - * Purges data in an Application Insights component by a set of user-defined filters. - * - *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch - * the execution of purge requests by sending a single command whose predicate includes all user identities that - * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param body Describes the body of a request to purge data in a single table of an Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response containing operationId for a specific purge action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response purgeWithResponse( - String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context); - - /** - * Get status for an ongoing purge operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. - * @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 status for an ongoing purge operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentPurgeStatusResponseInner getPurgeStatus(String resourceGroupName, String resourceName, String purgeId); - - /** - * Get status for an ongoing purge operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return status for an ongoing purge operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getPurgeStatusWithResponse( - String resourceGroupName, String resourceName, String purgeId, Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ExportConfigurationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ExportConfigurationsClient.java deleted file mode 100644 index 47898ca481d12..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ExportConfigurationsClient.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentExportConfigurationInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportRequest; -import java.util.List; - -/** An instance of this class provides access to all the operations defined in ExportConfigurationsClient. */ -public interface ExportConfigurationsClient { - /** - * Gets a list of Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 Continuous Export configuration of an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - List list(String resourceGroupName, String resourceName); - - /** - * Gets a list of Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configuration of an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response> listWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Create a Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a - * Application Insights component. - * @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 Continuous Export configurations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - List create( - String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties); - - /** - * Create a Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a - * Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configurations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response> createWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentExportRequest exportProperties, - Context context); - - /** - * Delete a Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @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 properties that define a Continuous Export configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentExportConfigurationInner delete( - String resourceGroupName, String resourceName, String exportId); - - /** - * Delete a Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a Continuous Export configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context); - - /** - * Get the Continuous Export configuration for this export id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @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 Continuous Export configuration for this export id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentExportConfigurationInner get( - String resourceGroupName, String resourceName, String exportId); - - /** - * Get the Continuous Export configuration for this export id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Continuous Export configuration for this export id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context); - - /** - * Update the Continuous Export configuration for this export id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param exportProperties Properties that need to be specified to update the Continuous Export configuration. - * @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 properties that define a Continuous Export configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentExportConfigurationInner update( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties); - - /** - * Update the Continuous Export configuration for this export id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param exportProperties Properties that need to be specified to update the Continuous Export configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a Continuous Export configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties, - Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/FavoritesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/FavoritesClient.java deleted file mode 100644 index 97b97695f1bd1..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/FavoritesClient.java +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; -import com.azure.resourcemanager.applicationinsights.models.FavoriteSourceType; -import com.azure.resourcemanager.applicationinsights.models.FavoriteType; -import java.util.List; - -/** An instance of this class provides access to all the operations defined in FavoritesClient. */ -public interface FavoritesClient { - /** - * Gets a list of favorites defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 favorites defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - List list(String resourceGroupName, String resourceName); - - /** - * Gets a list of favorites defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteType The type of favorite. Value can be either shared or user. - * @param sourceType Source type of favorite to return. When left out, the source type defaults to 'other' (not - * present in this enum). - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable favorite. If - * false, only return summary content for favorites. - * @param tags Tags that must be present on each favorite returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of favorites defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response> listWithResponse( - String resourceGroupName, - String resourceName, - FavoriteType favoriteType, - FavoriteSourceType sourceType, - Boolean canFetchContent, - List tags, - Context context); - - /** - * Get a single favorite by its FavoriteId, defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @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 single favorite by its FavoriteId, defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentFavoriteInner get(String resourceGroupName, String resourceName, String favoriteId); - - /** - * Get a single favorite by its FavoriteId, defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single favorite by its FavoriteId, defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context); - - /** - * Adds a new favorites to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to create a new favorite and add it to an - * Application Insights component. - * @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 properties that define a favorite that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentFavoriteInner add( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties); - - /** - * Adds a new favorites to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to create a new favorite and add it to an - * Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a favorite that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response addWithResponse( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, - Context context); - - /** - * Updates a favorite that has already been added to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to update the existing favorite. - * @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 properties that define a favorite that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentFavoriteInner update( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties); - - /** - * Updates a favorite that has already been added to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to update the existing favorite. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a favorite that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, - Context context); - - /** - * Remove a favorite that is associated to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String favoriteId); - - /** - * Remove a favorite that is associated to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/MyWorkbooksClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/MyWorkbooksClient.java deleted file mode 100644 index 46834ff927d30..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/MyWorkbooksClient.java +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner; -import com.azure.resourcemanager.applicationinsights.models.CategoryType; -import java.util.List; - -/** An instance of this class provides access to all the operations defined in MyWorkbooksClient. */ -public interface MyWorkbooksClient { - /** - * Get all private workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category); - - /** - * Get all private workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup( - String resourceGroupName, - CategoryType category, - List tags, - String sourceId, - Boolean canFetchContent, - Context context); - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(CategoryType category); - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - CategoryType category, List tags, Boolean canFetchContent, Context context); - - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MyWorkbookInner getByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName); - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); - - /** - * Create a new private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MyWorkbookInner createOrUpdate(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties); - - /** - * Create a new private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - MyWorkbookInner workbookProperties, - String sourceId, - Context context); - - /** - * Updates a private workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MyWorkbookInner update(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties); - - /** - * Updates a private workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String resourceName, - MyWorkbookInner workbookProperties, - String sourceId, - Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/OperationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/OperationsClient.java deleted file mode 100644 index cf11e5eb39881..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/OperationsClient.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public interface OperationsClient { - /** - * Lists all of the available insights REST API 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 result of the request to list Azure Workbooks operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all of the available insights REST API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Azure Workbooks operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ProactiveDetectionConfigurationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ProactiveDetectionConfigurationsClient.java deleted file mode 100644 index 389d5008928fa..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ProactiveDetectionConfigurationsClient.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentProactiveDetectionConfigurationInner; -import java.util.List; - -/** - * An instance of this class provides access to all the operations defined in ProactiveDetectionConfigurationsClient. - */ -public interface ProactiveDetectionConfigurationsClient { - /** - * Gets a list of ProactiveDetection configurations of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 ProactiveDetection configurations of an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - List list( - String resourceGroupName, String resourceName); - - /** - * Gets a list of ProactiveDetection configurations of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of ProactiveDetection configurations of an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response> listWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Get the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @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 ProactiveDetection configuration for this configuration id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentProactiveDetectionConfigurationInner get( - String resourceGroupName, String resourceName, String configurationId); - - /** - * Get the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the ProactiveDetection configuration for this configuration id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, String configurationId, Context context); - - /** - * Update the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. - * @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 properties that define a ProactiveDetection configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentProactiveDetectionConfigurationInner update( - String resourceGroupName, - String resourceName, - String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties); - - /** - * Update the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a ProactiveDetection configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String resourceName, - String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, - Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestLocationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestLocationsClient.java deleted file mode 100644 index 1674989efa788..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestLocationsClient.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentWebTestLocationInner; - -/** An instance of this class provides access to all the operations defined in WebTestLocationsClient. */ -public interface WebTestLocationsClient { - /** - * Gets a list of web test locations available to this Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 web test locations available to this Application Insights component. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName); - - /** - * Gets a list of web test locations available to this Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of web test locations available to this Application Insights component. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String resourceName, Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestsClient.java deleted file mode 100644 index ee97775978a5c..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestsClient.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.WebTestInner; -import com.azure.resourcemanager.applicationinsights.models.TagsResource; - -/** An instance of this class provides access to all the operations defined in WebTestsClient. */ -public interface WebTestsClient { - /** - * Get all Application Insights web tests defined within a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Application Insights web tests defined within a specified resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get all Application Insights web tests defined within a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined within a specified resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get a specific Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @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 specific Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WebTestInner getByResourceGroup(String resourceGroupName, String webTestName); - - /** - * Get a specific Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String webTestName, Context context); - - /** - * Creates or updates an Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web - * test definition. - * @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 an Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WebTestInner createOrUpdate(String resourceGroupName, String webTestName, WebTestInner webTestDefinition); - - /** - * Creates or updates an Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web - * test definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String webTestName, WebTestInner webTestDefinition, Context context); - - /** - * Creates or updates an Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. - * @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 an Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WebTestInner updateTags(String resourceGroupName, String webTestName, TagsResource webTestTags); - - /** - * Creates or updates an Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateTagsWithResponse( - String resourceGroupName, String webTestName, TagsResource webTestTags, Context context); - - /** - * Deletes an Application Insights web test. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String webTestName); - - /** - * Deletes an Application Insights web test. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String webTestName, Context context); - - /** - * Get all Application Insights web test alerts definitions within a subscription. - * - * @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 Application Insights web test alerts definitions within a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Get all Application Insights web test alerts definitions within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web test alerts definitions within a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Get all Application Insights web tests defined for the specified component. - * - * @param componentName The name of the Application Insights component resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Application Insights web tests defined for the specified component. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByComponent(String componentName, String resourceGroupName); - - /** - * Get all Application Insights web tests defined for the specified component. - * - * @param componentName The name of the Application Insights component resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined for the specified component. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByComponent(String componentName, String resourceGroupName, Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkItemConfigurationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkItemConfigurationsClient.java deleted file mode 100644 index 18f5f19be498b..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkItemConfigurationsClient.java +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.WorkItemConfigurationInner; -import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration; - -/** An instance of this class provides access to all the operations defined in WorkItemConfigurationsClient. */ -public interface WorkItemConfigurationsClient { - /** - * Gets the list work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurationErrorException thrown if the - * request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list work item configurations that exist for the application. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName); - - /** - * Gets the list work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurationErrorException thrown if the - * request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list work item configurations that exist for the application. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName, Context context); - - /** - * Create a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. - * @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 work item configuration associated with an application insights resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkItemConfigurationInner create( - String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties); - - /** - * Create a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return work item configuration associated with an application insights resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String resourceName, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context); - - /** - * Gets default work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 default work item configurations that exist for the application. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkItemConfigurationInner getDefault(String resourceGroupName, String resourceName); - - /** - * Gets default work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return default work item configurations that exist for the application. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDefaultWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Delete a work item configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String workItemConfigId); - - /** - * Delete a work item configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context); - - /** - * Gets specified work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @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 specified work item configuration for an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkItemConfigurationInner getItem(String resourceGroupName, String resourceName, String workItemConfigId); - - /** - * Gets specified work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specified work item configuration for an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getItemWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context); - - /** - * Update a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. - * @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 work item configuration associated with an application insights resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkItemConfigurationInner updateItem( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties); - - /** - * Update a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return work item configuration associated with an application insights resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateItemWithResponse( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApiKeysClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbookTemplatesClient.java similarity index 58% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApiKeysClient.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbookTemplatesClient.java index f4bc9adbec930..b78ea25bcae81 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApiKeysClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbookTemplatesClient.java @@ -9,129 +9,153 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentApiKeyInner; -import com.azure.resourcemanager.applicationinsights.models.ApiKeyRequest; +import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner; +import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateUpdateParameters; -/** An instance of this class provides access to all the operations defined in ApiKeysClient. */ -public interface ApiKeysClient { +/** An instance of this class provides access to all the operations defined in WorkbookTemplatesClient. */ +public interface WorkbookTemplatesClient { /** - * Gets a list of API keys of an Application Insights component. + * Get all Workbook templates defined within a specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. * @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 API keys of an Application Insights component. + * @return all Workbook templates defined within a specified resource group. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String resourceName); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets a list of API keys of an Application Insights component. + * Get all Workbook templates defined within a specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of API keys of an Application Insights component. + * @return all Workbook templates defined within a specified resource group. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a single workbook template by its resourceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @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 single workbook template by its resourceName. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkbookTemplateInner getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Get a single workbook template by its resourceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single workbook template by its resourceName. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( String resourceGroupName, String resourceName, Context context); /** - * Create an API Key of an Application Insights component. + * Delete a workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights - * component. * @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 properties that define an API key of an Application Insights Component. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentApiKeyInner create( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties); + void delete(String resourceGroupName, String resourceName); /** - * Create an API Key of an Application Insights component. + * Delete a workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights - * component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define an API key of an Application Insights Component. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); /** - * Delete an API Key of an Application Insights component. + * Create a new workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. + * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. * @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 properties that define an API key of an Application Insights Component. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentApiKeyInner delete(String resourceGroupName, String resourceName, String keyId); + WorkbookTemplateInner createOrUpdate( + String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties); /** - * Delete an API Key of an Application Insights component. + * Create a new workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. + * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define an API key of an Application Insights Component. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context); + Response createOrUpdateWithResponse( + String resourceGroupName, + String resourceName, + WorkbookTemplateInner workbookTemplateProperties, + Context context); /** - * Get the API Key for this key id. + * Updates a workbook template that has already been added. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. * @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 API Key for this key id. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentApiKeyInner get(String resourceGroupName, String resourceName, String keyId); + WorkbookTemplateInner update(String resourceGroupName, String resourceName); /** - * Get the API Key for this key id. + * Updates a workbook template that has already been added. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. + * @param workbookTemplateUpdateParameters Properties that need to be specified to patch a workbook template. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the API Key for this key id. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context); + Response updateWithResponse( + String resourceGroupName, + String resourceName, + WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, + Context context); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbooksClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbooksClient.java deleted file mode 100644 index 0d76cb25e105d..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbooksClient.java +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookInner; -import com.azure.resourcemanager.applicationinsights.models.CategoryType; -import com.azure.resourcemanager.applicationinsights.models.WorkbookUpdateParameters; -import java.util.List; - -/** An instance of this class provides access to all the operations defined in WorkbooksClient. */ -public interface WorkbooksClient { - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(CategoryType category); - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - CategoryType category, List tags, Boolean canFetchContent, Context context); - - /** - * Get all Workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category); - - /** - * Get all Workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup( - String resourceGroupName, - CategoryType category, - List tags, - String sourceId, - Boolean canFetchContent, - Context context); - - /** - * Get a single workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkbookInner getByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Get a single workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Delete a workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName); - - /** - * Delete a workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); - - /** - * Create a new workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkbookInner createOrUpdate(String resourceGroupName, String resourceName, WorkbookInner workbookProperties); - - /** - * Create a new workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - WorkbookInner workbookProperties, - String sourceId, - Context context); - - /** - * Updates a workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkbookInner update(String resourceGroupName, String resourceName); - - /** - * Updates a workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param workbookUpdateParameters Properties that need to be specified to create a new workbook. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String resourceName, - String sourceId, - WorkbookUpdateParameters workbookUpdateParameters, - Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/AnnotationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/AnnotationInner.java deleted file mode 100644 index 860531512953f..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/AnnotationInner.java +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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.OffsetDateTime; - -/** Annotation associated with an application insights resource. */ -@Fluent -public final class AnnotationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AnnotationInner.class); - - /* - * Name of annotation - */ - @JsonProperty(value = "AnnotationName") - private String annotationName; - - /* - * Category of annotation, free form - */ - @JsonProperty(value = "Category") - private String category; - - /* - * Time when event occurred - */ - @JsonProperty(value = "EventTime") - private OffsetDateTime eventTime; - - /* - * Unique Id for annotation - */ - @JsonProperty(value = "Id") - private String id; - - /* - * Serialized JSON object for detailed properties - */ - @JsonProperty(value = "Properties") - private String properties; - - /* - * Related parent annotation if any - */ - @JsonProperty(value = "RelatedAnnotation") - private String relatedAnnotation; - - /** - * Get the annotationName property: Name of annotation. - * - * @return the annotationName value. - */ - public String annotationName() { - return this.annotationName; - } - - /** - * Set the annotationName property: Name of annotation. - * - * @param annotationName the annotationName value to set. - * @return the AnnotationInner object itself. - */ - public AnnotationInner withAnnotationName(String annotationName) { - this.annotationName = annotationName; - return this; - } - - /** - * Get the category property: Category of annotation, free form. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: Category of annotation, free form. - * - * @param category the category value to set. - * @return the AnnotationInner object itself. - */ - public AnnotationInner withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the eventTime property: Time when event occurred. - * - * @return the eventTime value. - */ - public OffsetDateTime eventTime() { - return this.eventTime; - } - - /** - * Set the eventTime property: Time when event occurred. - * - * @param eventTime the eventTime value to set. - * @return the AnnotationInner object itself. - */ - public AnnotationInner withEventTime(OffsetDateTime eventTime) { - this.eventTime = eventTime; - return this; - } - - /** - * Get the id property: Unique Id for annotation. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Unique Id for annotation. - * - * @param id the id value to set. - * @return the AnnotationInner object itself. - */ - public AnnotationInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the properties property: Serialized JSON object for detailed properties. - * - * @return the properties value. - */ - public String properties() { - return this.properties; - } - - /** - * Set the properties property: Serialized JSON object for detailed properties. - * - * @param properties the properties value to set. - * @return the AnnotationInner object itself. - */ - public AnnotationInner withProperties(String properties) { - this.properties = properties; - return this; - } - - /** - * Get the relatedAnnotation property: Related parent annotation if any. - * - * @return the relatedAnnotation value. - */ - public String relatedAnnotation() { - return this.relatedAnnotation; - } - - /** - * Set the relatedAnnotation property: Related parent annotation if any. - * - * @param relatedAnnotation the relatedAnnotation value to set. - * @return the AnnotationInner object itself. - */ - public AnnotationInner withRelatedAnnotation(String relatedAnnotation) { - this.relatedAnnotation = relatedAnnotation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAnalyticsItemInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAnalyticsItemInner.java deleted file mode 100644 index 7874a1f736512..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAnalyticsItemInner.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentAnalyticsItemProperties; -import com.azure.resourcemanager.applicationinsights.models.ItemScope; -import com.azure.resourcemanager.applicationinsights.models.ItemType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties that define an Analytics item that is associated to an Application Insights component. */ -@Fluent -public final class ApplicationInsightsComponentAnalyticsItemInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentAnalyticsItemInner.class); - - /* - * Internally assigned unique id of the item definition. - */ - @JsonProperty(value = "Id") - private String id; - - /* - * The user-defined name of the item. - */ - @JsonProperty(value = "Name") - private String name; - - /* - * The content of this item - */ - @JsonProperty(value = "Content") - private String content; - - /* - * This instance's version of the data model. This can change as new - * features are added. - */ - @JsonProperty(value = "Version", access = JsonProperty.Access.WRITE_ONLY) - private String version; - - /* - * Enum indicating if this item definition is owned by a specific user or - * is shared between all users with access to the Application Insights - * component. - */ - @JsonProperty(value = "Scope") - private ItemScope scope; - - /* - * Enum indicating the type of the Analytics item. - */ - @JsonProperty(value = "Type") - private ItemType type; - - /* - * Date and time in UTC when this item was created. - */ - @JsonProperty(value = "TimeCreated", access = JsonProperty.Access.WRITE_ONLY) - private String timeCreated; - - /* - * Date and time in UTC of the last modification that was made to this - * item. - */ - @JsonProperty(value = "TimeModified", access = JsonProperty.Access.WRITE_ONLY) - private String timeModified; - - /* - * A set of properties that can be defined in the context of a specific - * item type. Each type may have its own properties. - */ - @JsonProperty(value = "Properties") - private ApplicationInsightsComponentAnalyticsItemProperties properties; - - /** - * Get the id property: Internally assigned unique id of the item definition. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Internally assigned unique id of the item definition. - * - * @param id the id value to set. - * @return the ApplicationInsightsComponentAnalyticsItemInner object itself. - */ - public ApplicationInsightsComponentAnalyticsItemInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: The user-defined name of the item. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The user-defined name of the item. - * - * @param name the name value to set. - * @return the ApplicationInsightsComponentAnalyticsItemInner object itself. - */ - public ApplicationInsightsComponentAnalyticsItemInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the content property: The content of this item. - * - * @return the content value. - */ - public String content() { - return this.content; - } - - /** - * Set the content property: The content of this item. - * - * @param content the content value to set. - * @return the ApplicationInsightsComponentAnalyticsItemInner object itself. - */ - public ApplicationInsightsComponentAnalyticsItemInner withContent(String content) { - this.content = content; - return this; - } - - /** - * Get the version property: This instance's version of the data model. This can change as new features are added. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the scope property: Enum indicating if this item definition is owned by a specific user or is shared between - * all users with access to the Application Insights component. - * - * @return the scope value. - */ - public ItemScope scope() { - return this.scope; - } - - /** - * Set the scope property: Enum indicating if this item definition is owned by a specific user or is shared between - * all users with access to the Application Insights component. - * - * @param scope the scope value to set. - * @return the ApplicationInsightsComponentAnalyticsItemInner object itself. - */ - public ApplicationInsightsComponentAnalyticsItemInner withScope(ItemScope scope) { - this.scope = scope; - return this; - } - - /** - * Get the type property: Enum indicating the type of the Analytics item. - * - * @return the type value. - */ - public ItemType type() { - return this.type; - } - - /** - * Set the type property: Enum indicating the type of the Analytics item. - * - * @param type the type value to set. - * @return the ApplicationInsightsComponentAnalyticsItemInner object itself. - */ - public ApplicationInsightsComponentAnalyticsItemInner withType(ItemType type) { - this.type = type; - return this; - } - - /** - * Get the timeCreated property: Date and time in UTC when this item was created. - * - * @return the timeCreated value. - */ - public String timeCreated() { - return this.timeCreated; - } - - /** - * Get the timeModified property: Date and time in UTC of the last modification that was made to this item. - * - * @return the timeModified value. - */ - public String timeModified() { - return this.timeModified; - } - - /** - * Get the properties property: A set of properties that can be defined in the context of a specific item type. Each - * type may have its own properties. - * - * @return the properties value. - */ - public ApplicationInsightsComponentAnalyticsItemProperties properties() { - return this.properties; - } - - /** - * Set the properties property: A set of properties that can be defined in the context of a specific item type. Each - * type may have its own properties. - * - * @param properties the properties value to set. - * @return the ApplicationInsightsComponentAnalyticsItemInner object itself. - */ - public ApplicationInsightsComponentAnalyticsItemInner withProperties( - ApplicationInsightsComponentAnalyticsItemProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentApiKeyInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentApiKeyInner.java deleted file mode 100644 index 76745f707cb29..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentApiKeyInner.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Properties that define an API key of an Application Insights Component. */ -@Fluent -public final class ApplicationInsightsComponentApiKeyInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentApiKeyInner.class); - - /* - * The unique ID of the API key inside an Application Insights component. - * It is auto generated when the API key is created. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * The API key value. It will be only return once when the API Key was - * created. - */ - @JsonProperty(value = "apiKey", access = JsonProperty.Access.WRITE_ONLY) - private String apiKey; - - /* - * The create date of this API key. - */ - @JsonProperty(value = "createdDate") - private String createdDate; - - /* - * The name of the API key. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The read access rights of this API Key. - */ - @JsonProperty(value = "linkedReadProperties") - private List linkedReadProperties; - - /* - * The write access rights of this API Key. - */ - @JsonProperty(value = "linkedWriteProperties") - private List linkedWriteProperties; - - /** - * Get the id property: The unique ID of the API key inside an Application Insights component. It is auto generated - * when the API key is created. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the apiKey property: The API key value. It will be only return once when the API Key was created. - * - * @return the apiKey value. - */ - public String apiKey() { - return this.apiKey; - } - - /** - * Get the createdDate property: The create date of this API key. - * - * @return the createdDate value. - */ - public String createdDate() { - return this.createdDate; - } - - /** - * Set the createdDate property: The create date of this API key. - * - * @param createdDate the createdDate value to set. - * @return the ApplicationInsightsComponentApiKeyInner object itself. - */ - public ApplicationInsightsComponentApiKeyInner withCreatedDate(String createdDate) { - this.createdDate = createdDate; - return this; - } - - /** - * Get the name property: The name of the API key. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the API key. - * - * @param name the name value to set. - * @return the ApplicationInsightsComponentApiKeyInner object itself. - */ - public ApplicationInsightsComponentApiKeyInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the linkedReadProperties property: The read access rights of this API Key. - * - * @return the linkedReadProperties value. - */ - public List linkedReadProperties() { - return this.linkedReadProperties; - } - - /** - * Set the linkedReadProperties property: The read access rights of this API Key. - * - * @param linkedReadProperties the linkedReadProperties value to set. - * @return the ApplicationInsightsComponentApiKeyInner object itself. - */ - public ApplicationInsightsComponentApiKeyInner withLinkedReadProperties(List linkedReadProperties) { - this.linkedReadProperties = linkedReadProperties; - return this; - } - - /** - * Get the linkedWriteProperties property: The write access rights of this API Key. - * - * @return the linkedWriteProperties value. - */ - public List linkedWriteProperties() { - return this.linkedWriteProperties; - } - - /** - * Set the linkedWriteProperties property: The write access rights of this API Key. - * - * @param linkedWriteProperties the linkedWriteProperties value to set. - * @return the ApplicationInsightsComponentApiKeyInner object itself. - */ - public ApplicationInsightsComponentApiKeyInner withLinkedWriteProperties(List linkedWriteProperties) { - this.linkedWriteProperties = linkedWriteProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAvailableFeaturesInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAvailableFeaturesInner.java deleted file mode 100644 index a00913acbf5e9..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAvailableFeaturesInner.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentFeature; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** An Application Insights component available features. */ -@Immutable -public final class ApplicationInsightsComponentAvailableFeaturesInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentAvailableFeaturesInner.class); - - /* - * A list of Application Insights component feature. - */ - @JsonProperty(value = "Result", access = JsonProperty.Access.WRITE_ONLY) - private List result; - - /** - * Get the result property: A list of Application Insights component feature. - * - * @return the result value. - */ - public List result() { - return this.result; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (result() != null) { - result().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentBillingFeaturesInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentBillingFeaturesInner.java deleted file mode 100644 index e3eb28785935e..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentBillingFeaturesInner.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** An Application Insights component billing features. */ -@Fluent -public final class ApplicationInsightsComponentBillingFeaturesInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentBillingFeaturesInner.class); - - /* - * An Application Insights component daily data volume cap - */ - @JsonProperty(value = "DataVolumeCap") - private ApplicationInsightsComponentDataVolumeCap dataVolumeCap; - - /* - * Current enabled pricing plan. When the component is in the Enterprise - * plan, this will list both 'Basic' and 'Application Insights Enterprise'. - */ - @JsonProperty(value = "CurrentBillingFeatures") - private List currentBillingFeatures; - - /** - * Get the dataVolumeCap property: An Application Insights component daily data volume cap. - * - * @return the dataVolumeCap value. - */ - public ApplicationInsightsComponentDataVolumeCap dataVolumeCap() { - return this.dataVolumeCap; - } - - /** - * Set the dataVolumeCap property: An Application Insights component daily data volume cap. - * - * @param dataVolumeCap the dataVolumeCap value to set. - * @return the ApplicationInsightsComponentBillingFeaturesInner object itself. - */ - public ApplicationInsightsComponentBillingFeaturesInner withDataVolumeCap( - ApplicationInsightsComponentDataVolumeCap dataVolumeCap) { - this.dataVolumeCap = dataVolumeCap; - return this; - } - - /** - * Get the currentBillingFeatures property: Current enabled pricing plan. When the component is in the Enterprise - * plan, this will list both 'Basic' and 'Application Insights Enterprise'. - * - * @return the currentBillingFeatures value. - */ - public List currentBillingFeatures() { - return this.currentBillingFeatures; - } - - /** - * Set the currentBillingFeatures property: Current enabled pricing plan. When the component is in the Enterprise - * plan, this will list both 'Basic' and 'Application Insights Enterprise'. - * - * @param currentBillingFeatures the currentBillingFeatures value to set. - * @return the ApplicationInsightsComponentBillingFeaturesInner object itself. - */ - public ApplicationInsightsComponentBillingFeaturesInner withCurrentBillingFeatures( - List currentBillingFeatures) { - this.currentBillingFeatures = currentBillingFeatures; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataVolumeCap() != null) { - dataVolumeCap().validate(); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentExportConfigurationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentExportConfigurationInner.java deleted file mode 100644 index 8f0a97e238c52..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentExportConfigurationInner.java +++ /dev/null @@ -1,351 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** Properties that define a Continuous Export configuration. */ -@Fluent -public final class ApplicationInsightsComponentExportConfigurationInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentExportConfigurationInner.class); - - /* - * The unique ID of the export configuration inside an Application Insights - * component. It is auto generated when the Continuous Export configuration - * is created. - */ - @JsonProperty(value = "ExportId", access = JsonProperty.Access.WRITE_ONLY) - private String exportId; - - /* - * The instrumentation key of the Application Insights component. - */ - @JsonProperty(value = "InstrumentationKey", access = JsonProperty.Access.WRITE_ONLY) - private String instrumentationKey; - - /* - * This comma separated list of document types that will be exported. The - * possible values include 'Requests', 'Event', 'Exceptions', 'Metrics', - * 'PageViews', 'PageViewPerformance', 'Rdd', 'PerformanceCounters', - * 'Availability', 'Messages'. - */ - @JsonProperty(value = "RecordTypes") - private String recordTypes; - - /* - * The name of the Application Insights component. - */ - @JsonProperty(value = "ApplicationName", access = JsonProperty.Access.WRITE_ONLY) - private String applicationName; - - /* - * The subscription of the Application Insights component. - */ - @JsonProperty(value = "SubscriptionId", access = JsonProperty.Access.WRITE_ONLY) - private String subscriptionId; - - /* - * The resource group of the Application Insights component. - */ - @JsonProperty(value = "ResourceGroup", access = JsonProperty.Access.WRITE_ONLY) - private String resourceGroup; - - /* - * The destination storage account subscription ID. - */ - @JsonProperty(value = "DestinationStorageSubscriptionId", access = JsonProperty.Access.WRITE_ONLY) - private String destinationStorageSubscriptionId; - - /* - * The destination account location ID. - */ - @JsonProperty(value = "DestinationStorageLocationId", access = JsonProperty.Access.WRITE_ONLY) - private String destinationStorageLocationId; - - /* - * The name of destination account. - */ - @JsonProperty(value = "DestinationAccountId", access = JsonProperty.Access.WRITE_ONLY) - private String destinationAccountId; - - /* - * The destination type. - */ - @JsonProperty(value = "DestinationType", access = JsonProperty.Access.WRITE_ONLY) - private String destinationType; - - /* - * This will be 'true' if the Continuous Export configuration is enabled, - * otherwise it will be 'false'. - */ - @JsonProperty(value = "IsUserEnabled", access = JsonProperty.Access.WRITE_ONLY) - private String isUserEnabled; - - /* - * Last time the Continuous Export configuration was updated. - */ - @JsonProperty(value = "LastUserUpdate", access = JsonProperty.Access.WRITE_ONLY) - private String lastUserUpdate; - - /* - * Deprecated - */ - @JsonProperty(value = "NotificationQueueEnabled") - private String notificationQueueEnabled; - - /* - * This indicates current Continuous Export configuration status. The - * possible values are 'Preparing', 'Success', 'Failure'. - */ - @JsonProperty(value = "ExportStatus", access = JsonProperty.Access.WRITE_ONLY) - private String exportStatus; - - /* - * The last time data was successfully delivered to the destination storage - * container for this Continuous Export configuration. - */ - @JsonProperty(value = "LastSuccessTime", access = JsonProperty.Access.WRITE_ONLY) - private String lastSuccessTime; - - /* - * The last time the Continuous Export configuration started failing. - */ - @JsonProperty(value = "LastGapTime", access = JsonProperty.Access.WRITE_ONLY) - private String lastGapTime; - - /* - * This is the reason the Continuous Export configuration started failing. - * It can be 'AzureStorageNotFound' or 'AzureStorageAccessDenied'. - */ - @JsonProperty(value = "PermanentErrorReason", access = JsonProperty.Access.WRITE_ONLY) - private String permanentErrorReason; - - /* - * The name of the destination storage account. - */ - @JsonProperty(value = "StorageName", access = JsonProperty.Access.WRITE_ONLY) - private String storageName; - - /* - * The name of the destination storage container. - */ - @JsonProperty(value = "ContainerName", access = JsonProperty.Access.WRITE_ONLY) - private String containerName; - - /** - * Get the exportId property: The unique ID of the export configuration inside an Application Insights component. It - * is auto generated when the Continuous Export configuration is created. - * - * @return the exportId value. - */ - public String exportId() { - return this.exportId; - } - - /** - * Get the instrumentationKey property: The instrumentation key of the Application Insights component. - * - * @return the instrumentationKey value. - */ - public String instrumentationKey() { - return this.instrumentationKey; - } - - /** - * Get the recordTypes property: This comma separated list of document types that will be exported. The possible - * values include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', - * 'PerformanceCounters', 'Availability', 'Messages'. - * - * @return the recordTypes value. - */ - public String recordTypes() { - return this.recordTypes; - } - - /** - * Set the recordTypes property: This comma separated list of document types that will be exported. The possible - * values include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', - * 'PerformanceCounters', 'Availability', 'Messages'. - * - * @param recordTypes the recordTypes value to set. - * @return the ApplicationInsightsComponentExportConfigurationInner object itself. - */ - public ApplicationInsightsComponentExportConfigurationInner withRecordTypes(String recordTypes) { - this.recordTypes = recordTypes; - return this; - } - - /** - * Get the applicationName property: The name of the Application Insights component. - * - * @return the applicationName value. - */ - public String applicationName() { - return this.applicationName; - } - - /** - * Get the subscriptionId property: The subscription of the Application Insights component. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Get the resourceGroup property: The resource group of the Application Insights component. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Get the destinationStorageSubscriptionId property: The destination storage account subscription ID. - * - * @return the destinationStorageSubscriptionId value. - */ - public String destinationStorageSubscriptionId() { - return this.destinationStorageSubscriptionId; - } - - /** - * Get the destinationStorageLocationId property: The destination account location ID. - * - * @return the destinationStorageLocationId value. - */ - public String destinationStorageLocationId() { - return this.destinationStorageLocationId; - } - - /** - * Get the destinationAccountId property: The name of destination account. - * - * @return the destinationAccountId value. - */ - public String destinationAccountId() { - return this.destinationAccountId; - } - - /** - * Get the destinationType property: The destination type. - * - * @return the destinationType value. - */ - public String destinationType() { - return this.destinationType; - } - - /** - * Get the isUserEnabled property: This will be 'true' if the Continuous Export configuration is enabled, otherwise - * it will be 'false'. - * - * @return the isUserEnabled value. - */ - public String isUserEnabled() { - return this.isUserEnabled; - } - - /** - * Get the lastUserUpdate property: Last time the Continuous Export configuration was updated. - * - * @return the lastUserUpdate value. - */ - public String lastUserUpdate() { - return this.lastUserUpdate; - } - - /** - * Get the notificationQueueEnabled property: Deprecated. - * - * @return the notificationQueueEnabled value. - */ - public String notificationQueueEnabled() { - return this.notificationQueueEnabled; - } - - /** - * Set the notificationQueueEnabled property: Deprecated. - * - * @param notificationQueueEnabled the notificationQueueEnabled value to set. - * @return the ApplicationInsightsComponentExportConfigurationInner object itself. - */ - public ApplicationInsightsComponentExportConfigurationInner withNotificationQueueEnabled( - String notificationQueueEnabled) { - this.notificationQueueEnabled = notificationQueueEnabled; - return this; - } - - /** - * Get the exportStatus property: This indicates current Continuous Export configuration status. The possible values - * are 'Preparing', 'Success', 'Failure'. - * - * @return the exportStatus value. - */ - public String exportStatus() { - return this.exportStatus; - } - - /** - * Get the lastSuccessTime property: The last time data was successfully delivered to the destination storage - * container for this Continuous Export configuration. - * - * @return the lastSuccessTime value. - */ - public String lastSuccessTime() { - return this.lastSuccessTime; - } - - /** - * Get the lastGapTime property: The last time the Continuous Export configuration started failing. - * - * @return the lastGapTime value. - */ - public String lastGapTime() { - return this.lastGapTime; - } - - /** - * Get the permanentErrorReason property: This is the reason the Continuous Export configuration started failing. It - * can be 'AzureStorageNotFound' or 'AzureStorageAccessDenied'. - * - * @return the permanentErrorReason value. - */ - public String permanentErrorReason() { - return this.permanentErrorReason; - } - - /** - * Get the storageName property: The name of the destination storage account. - * - * @return the storageName value. - */ - public String storageName() { - return this.storageName; - } - - /** - * Get the containerName property: The name of the destination storage container. - * - * @return the containerName value. - */ - public String containerName() { - return this.containerName; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFavoriteInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFavoriteInner.java deleted file mode 100644 index 127347058327e..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFavoriteInner.java +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.models.FavoriteType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Properties that define a favorite that is associated to an Application Insights component. */ -@Fluent -public final class ApplicationInsightsComponentFavoriteInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentFavoriteInner.class); - - /* - * The user-defined name of the favorite. - */ - @JsonProperty(value = "Name") - private String name; - - /* - * Configuration of this particular favorite, which are driven by the Azure - * portal UX. Configuration data is a string containing valid JSON - */ - @JsonProperty(value = "Config") - private String config; - - /* - * This instance's version of the data model. This can change as new - * features are added that can be marked favorite. Current examples include - * MetricsExplorer (ME) and Search. - */ - @JsonProperty(value = "Version") - private String version; - - /* - * Internally assigned unique id of the favorite definition. - */ - @JsonProperty(value = "FavoriteId", access = JsonProperty.Access.WRITE_ONLY) - private String favoriteId; - - /* - * Enum indicating if this favorite definition is owned by a specific user - * or is shared between all users with access to the Application Insights - * component. - */ - @JsonProperty(value = "FavoriteType") - private FavoriteType favoriteType; - - /* - * The source of the favorite definition. - */ - @JsonProperty(value = "SourceType") - private String sourceType; - - /* - * Date and time in UTC of the last modification that was made to this - * favorite definition. - */ - @JsonProperty(value = "TimeModified", access = JsonProperty.Access.WRITE_ONLY) - private String timeModified; - - /* - * A list of 0 or more tags that are associated with this favorite - * definition - */ - @JsonProperty(value = "Tags") - private List tags; - - /* - * Favorite category, as defined by the user at creation time. - */ - @JsonProperty(value = "Category") - private String category; - - /* - * Flag denoting wether or not this favorite was generated from a template. - */ - @JsonProperty(value = "IsGeneratedFromTemplate") - private Boolean isGeneratedFromTemplate; - - /* - * Unique user id of the specific user that owns this favorite. - */ - @JsonProperty(value = "UserId", access = JsonProperty.Access.WRITE_ONLY) - private String userId; - - /** - * Get the name property: The user-defined name of the favorite. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The user-defined name of the favorite. - * - * @param name the name value to set. - * @return the ApplicationInsightsComponentFavoriteInner object itself. - */ - public ApplicationInsightsComponentFavoriteInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the config property: Configuration of this particular favorite, which are driven by the Azure portal UX. - * Configuration data is a string containing valid JSON. - * - * @return the config value. - */ - public String config() { - return this.config; - } - - /** - * Set the config property: Configuration of this particular favorite, which are driven by the Azure portal UX. - * Configuration data is a string containing valid JSON. - * - * @param config the config value to set. - * @return the ApplicationInsightsComponentFavoriteInner object itself. - */ - public ApplicationInsightsComponentFavoriteInner withConfig(String config) { - this.config = config; - return this; - } - - /** - * Get the version property: This instance's version of the data model. This can change as new features are added - * that can be marked favorite. Current examples include MetricsExplorer (ME) and Search. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: This instance's version of the data model. This can change as new features are added - * that can be marked favorite. Current examples include MetricsExplorer (ME) and Search. - * - * @param version the version value to set. - * @return the ApplicationInsightsComponentFavoriteInner object itself. - */ - public ApplicationInsightsComponentFavoriteInner withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the favoriteId property: Internally assigned unique id of the favorite definition. - * - * @return the favoriteId value. - */ - public String favoriteId() { - return this.favoriteId; - } - - /** - * Get the favoriteType property: Enum indicating if this favorite definition is owned by a specific user or is - * shared between all users with access to the Application Insights component. - * - * @return the favoriteType value. - */ - public FavoriteType favoriteType() { - return this.favoriteType; - } - - /** - * Set the favoriteType property: Enum indicating if this favorite definition is owned by a specific user or is - * shared between all users with access to the Application Insights component. - * - * @param favoriteType the favoriteType value to set. - * @return the ApplicationInsightsComponentFavoriteInner object itself. - */ - public ApplicationInsightsComponentFavoriteInner withFavoriteType(FavoriteType favoriteType) { - this.favoriteType = favoriteType; - return this; - } - - /** - * Get the sourceType property: The source of the favorite definition. - * - * @return the sourceType value. - */ - public String sourceType() { - return this.sourceType; - } - - /** - * Set the sourceType property: The source of the favorite definition. - * - * @param sourceType the sourceType value to set. - * @return the ApplicationInsightsComponentFavoriteInner object itself. - */ - public ApplicationInsightsComponentFavoriteInner withSourceType(String sourceType) { - this.sourceType = sourceType; - return this; - } - - /** - * Get the timeModified property: Date and time in UTC of the last modification that was made to this favorite - * definition. - * - * @return the timeModified value. - */ - public String timeModified() { - return this.timeModified; - } - - /** - * Get the tags property: A list of 0 or more tags that are associated with this favorite definition. - * - * @return the tags value. - */ - public List tags() { - return this.tags; - } - - /** - * Set the tags property: A list of 0 or more tags that are associated with this favorite definition. - * - * @param tags the tags value to set. - * @return the ApplicationInsightsComponentFavoriteInner object itself. - */ - public ApplicationInsightsComponentFavoriteInner withTags(List tags) { - this.tags = tags; - return this; - } - - /** - * Get the category property: Favorite category, as defined by the user at creation time. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: Favorite category, as defined by the user at creation time. - * - * @param category the category value to set. - * @return the ApplicationInsightsComponentFavoriteInner object itself. - */ - public ApplicationInsightsComponentFavoriteInner withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the isGeneratedFromTemplate property: Flag denoting wether or not this favorite was generated from a - * template. - * - * @return the isGeneratedFromTemplate value. - */ - public Boolean isGeneratedFromTemplate() { - return this.isGeneratedFromTemplate; - } - - /** - * Set the isGeneratedFromTemplate property: Flag denoting wether or not this favorite was generated from a - * template. - * - * @param isGeneratedFromTemplate the isGeneratedFromTemplate value to set. - * @return the ApplicationInsightsComponentFavoriteInner object itself. - */ - public ApplicationInsightsComponentFavoriteInner withIsGeneratedFromTemplate(Boolean isGeneratedFromTemplate) { - this.isGeneratedFromTemplate = isGeneratedFromTemplate; - return this; - } - - /** - * Get the userId property: Unique user id of the specific user that owns this favorite. - * - * @return the userId value. - */ - public String userId() { - return this.userId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFeatureCapabilitiesInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFeatureCapabilitiesInner.java deleted file mode 100644 index e56afd1ba8a60..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFeatureCapabilitiesInner.java +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent.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; - -/** An Application Insights component feature capabilities. */ -@Immutable -public final class ApplicationInsightsComponentFeatureCapabilitiesInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentFeatureCapabilitiesInner.class); - - /* - * Whether allow to use continuous export feature. - */ - @JsonProperty(value = "SupportExportData", access = JsonProperty.Access.WRITE_ONLY) - private Boolean supportExportData; - - /* - * Reserved, not used now. - */ - @JsonProperty(value = "BurstThrottlePolicy", access = JsonProperty.Access.WRITE_ONLY) - private String burstThrottlePolicy; - - /* - * Reserved, not used now. - */ - @JsonProperty(value = "MetadataClass", access = JsonProperty.Access.WRITE_ONLY) - private String metadataClass; - - /* - * Reserved, not used now. - */ - @JsonProperty(value = "LiveStreamMetrics", access = JsonProperty.Access.WRITE_ONLY) - private Boolean liveStreamMetrics; - - /* - * Reserved, not used now. - */ - @JsonProperty(value = "ApplicationMap", access = JsonProperty.Access.WRITE_ONLY) - private Boolean applicationMap; - - /* - * Whether allow to use work item integration feature. - */ - @JsonProperty(value = "WorkItemIntegration", access = JsonProperty.Access.WRITE_ONLY) - private Boolean workItemIntegration; - - /* - * Reserved, not used now. - */ - @JsonProperty(value = "PowerBIIntegration", access = JsonProperty.Access.WRITE_ONLY) - private Boolean powerBIIntegration; - - /* - * Reserved, not used now. - */ - @JsonProperty(value = "OpenSchema", access = JsonProperty.Access.WRITE_ONLY) - private Boolean openSchema; - - /* - * Reserved, not used now. - */ - @JsonProperty(value = "ProactiveDetection", access = JsonProperty.Access.WRITE_ONLY) - private Boolean proactiveDetection; - - /* - * Reserved, not used now. - */ - @JsonProperty(value = "AnalyticsIntegration", access = JsonProperty.Access.WRITE_ONLY) - private Boolean analyticsIntegration; - - /* - * Whether allow to use multiple steps web test feature. - */ - @JsonProperty(value = "MultipleStepWebTest", access = JsonProperty.Access.WRITE_ONLY) - private Boolean multipleStepWebTest; - - /* - * Reserved, not used now. - */ - @JsonProperty(value = "ApiAccessLevel", access = JsonProperty.Access.WRITE_ONLY) - private String apiAccessLevel; - - /* - * The application insights component used tracking type. - */ - @JsonProperty(value = "TrackingType", access = JsonProperty.Access.WRITE_ONLY) - private String trackingType; - - /* - * Daily data volume cap in GB. - */ - @JsonProperty(value = "DailyCap", access = JsonProperty.Access.WRITE_ONLY) - private Float dailyCap; - - /* - * Daily data volume cap UTC reset hour. - */ - @JsonProperty(value = "DailyCapResetTime", access = JsonProperty.Access.WRITE_ONLY) - private Float dailyCapResetTime; - - /* - * Reserved, not used now. - */ - @JsonProperty(value = "ThrottleRate", access = JsonProperty.Access.WRITE_ONLY) - private Float throttleRate; - - /** - * Get the supportExportData property: Whether allow to use continuous export feature. - * - * @return the supportExportData value. - */ - public Boolean supportExportData() { - return this.supportExportData; - } - - /** - * Get the burstThrottlePolicy property: Reserved, not used now. - * - * @return the burstThrottlePolicy value. - */ - public String burstThrottlePolicy() { - return this.burstThrottlePolicy; - } - - /** - * Get the metadataClass property: Reserved, not used now. - * - * @return the metadataClass value. - */ - public String metadataClass() { - return this.metadataClass; - } - - /** - * Get the liveStreamMetrics property: Reserved, not used now. - * - * @return the liveStreamMetrics value. - */ - public Boolean liveStreamMetrics() { - return this.liveStreamMetrics; - } - - /** - * Get the applicationMap property: Reserved, not used now. - * - * @return the applicationMap value. - */ - public Boolean applicationMap() { - return this.applicationMap; - } - - /** - * Get the workItemIntegration property: Whether allow to use work item integration feature. - * - * @return the workItemIntegration value. - */ - public Boolean workItemIntegration() { - return this.workItemIntegration; - } - - /** - * Get the powerBIIntegration property: Reserved, not used now. - * - * @return the powerBIIntegration value. - */ - public Boolean powerBIIntegration() { - return this.powerBIIntegration; - } - - /** - * Get the openSchema property: Reserved, not used now. - * - * @return the openSchema value. - */ - public Boolean openSchema() { - return this.openSchema; - } - - /** - * Get the proactiveDetection property: Reserved, not used now. - * - * @return the proactiveDetection value. - */ - public Boolean proactiveDetection() { - return this.proactiveDetection; - } - - /** - * Get the analyticsIntegration property: Reserved, not used now. - * - * @return the analyticsIntegration value. - */ - public Boolean analyticsIntegration() { - return this.analyticsIntegration; - } - - /** - * Get the multipleStepWebTest property: Whether allow to use multiple steps web test feature. - * - * @return the multipleStepWebTest value. - */ - public Boolean multipleStepWebTest() { - return this.multipleStepWebTest; - } - - /** - * Get the apiAccessLevel property: Reserved, not used now. - * - * @return the apiAccessLevel value. - */ - public String apiAccessLevel() { - return this.apiAccessLevel; - } - - /** - * Get the trackingType property: The application insights component used tracking type. - * - * @return the trackingType value. - */ - public String trackingType() { - return this.trackingType; - } - - /** - * Get the dailyCap property: Daily data volume cap in GB. - * - * @return the dailyCap value. - */ - public Float dailyCap() { - return this.dailyCap; - } - - /** - * Get the dailyCapResetTime property: Daily data volume cap UTC reset hour. - * - * @return the dailyCapResetTime value. - */ - public Float dailyCapResetTime() { - return this.dailyCapResetTime; - } - - /** - * Get the throttleRate property: Reserved, not used now. - * - * @return the throttleRate value. - */ - public Float throttleRate() { - return this.throttleRate; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentInner.java deleted file mode 100644 index 5b3fc73c3a261..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentInner.java +++ /dev/null @@ -1,487 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.models.ApplicationType; -import com.azure.resourcemanager.applicationinsights.models.ComponentsResource; -import com.azure.resourcemanager.applicationinsights.models.FlowType; -import com.azure.resourcemanager.applicationinsights.models.IngestionMode; -import com.azure.resourcemanager.applicationinsights.models.PrivateLinkScopedResource; -import com.azure.resourcemanager.applicationinsights.models.RequestSource; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** An Application Insights component definition. */ -@JsonFlatten -@Fluent -public class ApplicationInsightsComponentInner extends ComponentsResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentInner.class); - - /* - * The kind of application that this component refers to, used to customize - * UI. This value is a freeform string, values should typically be one of - * the following: web, ios, other, store, java, phone. - */ - @JsonProperty(value = "kind", required = true) - private String kind; - - /* - * The unique ID of your application. This field mirrors the 'Name' field - * and cannot be changed. - */ - @JsonProperty(value = "properties.ApplicationId", access = JsonProperty.Access.WRITE_ONLY) - private String applicationId; - - /* - * Application Insights Unique ID for your Application. - */ - @JsonProperty(value = "properties.AppId", access = JsonProperty.Access.WRITE_ONLY) - private String appId; - - /* - * Type of application being monitored. - */ - @JsonProperty(value = "properties.Application_Type") - private ApplicationType applicationType; - - /* - * Used by the Application Insights system to determine what kind of flow - * this component was created by. This is to be set to 'Bluefield' when - * creating/updating a component via the REST API. - */ - @JsonProperty(value = "properties.Flow_Type") - private FlowType flowType; - - /* - * Describes what tool created this Application Insights component. - * Customers using this API should set this to the default 'rest'. - */ - @JsonProperty(value = "properties.Request_Source") - private RequestSource requestSource; - - /* - * Application Insights Instrumentation key. A read-only value that - * applications can use to identify the destination for all telemetry sent - * to Azure Application Insights. This value will be supplied upon - * construction of each new Application Insights component. - */ - @JsonProperty(value = "properties.InstrumentationKey", access = JsonProperty.Access.WRITE_ONLY) - private String instrumentationKey; - - /* - * Creation Date for the Application Insights component, in ISO 8601 - * format. - */ - @JsonProperty(value = "properties.CreationDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationDate; - - /* - * Azure Tenant Id. - */ - @JsonProperty(value = "properties.TenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /* - * The unique application ID created when a new application is added to - * HockeyApp, used for communications with HockeyApp. - */ - @JsonProperty(value = "properties.HockeyAppId") - private String hockeyAppId; - - /* - * Token used to authenticate communications with between Application - * Insights and HockeyApp. - */ - @JsonProperty(value = "properties.HockeyAppToken", access = JsonProperty.Access.WRITE_ONLY) - private String hockeyAppToken; - - /* - * Current state of this component: whether or not is has been provisioned - * within the resource group it is defined. Users cannot change this value - * but are able to read from it. Values will include Succeeded, Deploying, - * Canceled, and Failed. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /* - * Percentage of the data produced by the application being monitored that - * is being sampled for Application Insights telemetry. - */ - @JsonProperty(value = "properties.SamplingPercentage") - private Double samplingPercentage; - - /* - * Application Insights component connection string. - */ - @JsonProperty(value = "properties.ConnectionString", access = JsonProperty.Access.WRITE_ONLY) - private String connectionString; - - /* - * Retention period in days. - */ - @JsonProperty(value = "properties.RetentionInDays") - private Integer retentionInDays; - - /* - * Disable IP masking. - */ - @JsonProperty(value = "properties.DisableIpMasking") - private Boolean disableIpMasking; - - /* - * Purge data immediately after 30 days. - */ - @JsonProperty(value = "properties.ImmediatePurgeDataOn30Days") - private Boolean immediatePurgeDataOn30Days; - - /* - * List of linked private link scope resources. - */ - @JsonProperty(value = "properties.PrivateLinkScopedResources", access = JsonProperty.Access.WRITE_ONLY) - private List privateLinkScopedResources; - - /* - * Indicates the flow of the ingestion. - */ - @JsonProperty(value = "properties.IngestionMode") - private IngestionMode ingestionMode; - - /** - * Get the kind property: The kind of application that this component refers to, used to customize UI. This value is - * a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: The kind of application that this component refers to, used to customize UI. This value is - * a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. - * - * @param kind the kind value to set. - * @return the ApplicationInsightsComponentInner object itself. - */ - public ApplicationInsightsComponentInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the applicationId property: The unique ID of your application. This field mirrors the 'Name' field and cannot - * be changed. - * - * @return the applicationId value. - */ - public String applicationId() { - return this.applicationId; - } - - /** - * Get the appId property: Application Insights Unique ID for your Application. - * - * @return the appId value. - */ - public String appId() { - return this.appId; - } - - /** - * Get the applicationType property: Type of application being monitored. - * - * @return the applicationType value. - */ - public ApplicationType applicationType() { - return this.applicationType; - } - - /** - * Set the applicationType property: Type of application being monitored. - * - * @param applicationType the applicationType value to set. - * @return the ApplicationInsightsComponentInner object itself. - */ - public ApplicationInsightsComponentInner withApplicationType(ApplicationType applicationType) { - this.applicationType = applicationType; - return this; - } - - /** - * Get the flowType property: Used by the Application Insights system to determine what kind of flow this component - * was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. - * - * @return the flowType value. - */ - public FlowType flowType() { - return this.flowType; - } - - /** - * Set the flowType property: Used by the Application Insights system to determine what kind of flow this component - * was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. - * - * @param flowType the flowType value to set. - * @return the ApplicationInsightsComponentInner object itself. - */ - public ApplicationInsightsComponentInner withFlowType(FlowType flowType) { - this.flowType = flowType; - return this; - } - - /** - * Get the requestSource property: Describes what tool created this Application Insights component. Customers using - * this API should set this to the default 'rest'. - * - * @return the requestSource value. - */ - public RequestSource requestSource() { - return this.requestSource; - } - - /** - * Set the requestSource property: Describes what tool created this Application Insights component. Customers using - * this API should set this to the default 'rest'. - * - * @param requestSource the requestSource value to set. - * @return the ApplicationInsightsComponentInner object itself. - */ - public ApplicationInsightsComponentInner withRequestSource(RequestSource requestSource) { - this.requestSource = requestSource; - return this; - } - - /** - * Get the instrumentationKey property: Application Insights Instrumentation key. A read-only value that - * applications can use to identify the destination for all telemetry sent to Azure Application Insights. This value - * will be supplied upon construction of each new Application Insights component. - * - * @return the instrumentationKey value. - */ - public String instrumentationKey() { - return this.instrumentationKey; - } - - /** - * Get the creationDate property: Creation Date for the Application Insights component, in ISO 8601 format. - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.creationDate; - } - - /** - * Get the tenantId property: Azure Tenant Id. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the hockeyAppId property: The unique application ID created when a new application is added to HockeyApp, - * used for communications with HockeyApp. - * - * @return the hockeyAppId value. - */ - public String hockeyAppId() { - return this.hockeyAppId; - } - - /** - * Set the hockeyAppId property: The unique application ID created when a new application is added to HockeyApp, - * used for communications with HockeyApp. - * - * @param hockeyAppId the hockeyAppId value to set. - * @return the ApplicationInsightsComponentInner object itself. - */ - public ApplicationInsightsComponentInner withHockeyAppId(String hockeyAppId) { - this.hockeyAppId = hockeyAppId; - return this; - } - - /** - * Get the hockeyAppToken property: Token used to authenticate communications with between Application Insights and - * HockeyApp. - * - * @return the hockeyAppToken value. - */ - public String hockeyAppToken() { - return this.hockeyAppToken; - } - - /** - * Get the provisioningState property: Current state of this component: whether or not is has been provisioned - * within the resource group it is defined. Users cannot change this value but are able to read from it. Values will - * include Succeeded, Deploying, Canceled, and Failed. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the samplingPercentage property: Percentage of the data produced by the application being monitored that is - * being sampled for Application Insights telemetry. - * - * @return the samplingPercentage value. - */ - public Double samplingPercentage() { - return this.samplingPercentage; - } - - /** - * Set the samplingPercentage property: Percentage of the data produced by the application being monitored that is - * being sampled for Application Insights telemetry. - * - * @param samplingPercentage the samplingPercentage value to set. - * @return the ApplicationInsightsComponentInner object itself. - */ - public ApplicationInsightsComponentInner withSamplingPercentage(Double samplingPercentage) { - this.samplingPercentage = samplingPercentage; - return this; - } - - /** - * Get the connectionString property: Application Insights component connection string. - * - * @return the connectionString value. - */ - public String connectionString() { - return this.connectionString; - } - - /** - * Get the retentionInDays property: Retention period in days. - * - * @return the retentionInDays value. - */ - public Integer retentionInDays() { - return this.retentionInDays; - } - - /** - * Set the retentionInDays property: Retention period in days. - * - * @param retentionInDays the retentionInDays value to set. - * @return the ApplicationInsightsComponentInner object itself. - */ - public ApplicationInsightsComponentInner withRetentionInDays(Integer retentionInDays) { - this.retentionInDays = retentionInDays; - return this; - } - - /** - * Get the disableIpMasking property: Disable IP masking. - * - * @return the disableIpMasking value. - */ - public Boolean disableIpMasking() { - return this.disableIpMasking; - } - - /** - * Set the disableIpMasking property: Disable IP masking. - * - * @param disableIpMasking the disableIpMasking value to set. - * @return the ApplicationInsightsComponentInner object itself. - */ - public ApplicationInsightsComponentInner withDisableIpMasking(Boolean disableIpMasking) { - this.disableIpMasking = disableIpMasking; - return this; - } - - /** - * Get the immediatePurgeDataOn30Days property: Purge data immediately after 30 days. - * - * @return the immediatePurgeDataOn30Days value. - */ - public Boolean immediatePurgeDataOn30Days() { - return this.immediatePurgeDataOn30Days; - } - - /** - * Set the immediatePurgeDataOn30Days property: Purge data immediately after 30 days. - * - * @param immediatePurgeDataOn30Days the immediatePurgeDataOn30Days value to set. - * @return the ApplicationInsightsComponentInner object itself. - */ - public ApplicationInsightsComponentInner withImmediatePurgeDataOn30Days(Boolean immediatePurgeDataOn30Days) { - this.immediatePurgeDataOn30Days = immediatePurgeDataOn30Days; - return this; - } - - /** - * Get the privateLinkScopedResources property: List of linked private link scope resources. - * - * @return the privateLinkScopedResources value. - */ - public List privateLinkScopedResources() { - return this.privateLinkScopedResources; - } - - /** - * Get the ingestionMode property: Indicates the flow of the ingestion. - * - * @return the ingestionMode value. - */ - public IngestionMode ingestionMode() { - return this.ingestionMode; - } - - /** - * Set the ingestionMode property: Indicates the flow of the ingestion. - * - * @param ingestionMode the ingestionMode value to set. - * @return the ApplicationInsightsComponentInner object itself. - */ - public ApplicationInsightsComponentInner withIngestionMode(IngestionMode ingestionMode) { - this.ingestionMode = ingestionMode; - return this; - } - - /** {@inheritDoc} */ - @Override - public ApplicationInsightsComponentInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ApplicationInsightsComponentInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (kind() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property kind in model ApplicationInsightsComponentInner")); - } - if (privateLinkScopedResources() != null) { - privateLinkScopedResources().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProactiveDetectionConfigurationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProactiveDetectionConfigurationInner.java deleted file mode 100644 index 3e2af251a89cc..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProactiveDetectionConfigurationInner.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Properties that define a ProactiveDetection configuration. */ -@Fluent -public final class ApplicationInsightsComponentProactiveDetectionConfigurationInner { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(ApplicationInsightsComponentProactiveDetectionConfigurationInner.class); - - /* - * The rule name - */ - @JsonProperty(value = "Name") - private String name; - - /* - * A flag that indicates whether this rule is enabled by the user - */ - @JsonProperty(value = "Enabled") - private Boolean enabled; - - /* - * A flag that indicated whether notifications on this rule should be sent - * to subscription owners - */ - @JsonProperty(value = "SendEmailsToSubscriptionOwners") - private Boolean sendEmailsToSubscriptionOwners; - - /* - * Custom email addresses for this rule notifications - */ - @JsonProperty(value = "CustomEmails") - private List customEmails; - - /* - * The last time this rule was updated - */ - @JsonProperty(value = "LastUpdatedTime") - private String lastUpdatedTime; - - /* - * Static definitions of the ProactiveDetection configuration rule (same - * values for all components). - */ - @JsonProperty(value = "RuleDefinitions") - private ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions ruleDefinitions; - - /** - * Get the name property: The rule name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The rule name. - * - * @param name the name value to set. - * @return the ApplicationInsightsComponentProactiveDetectionConfigurationInner object itself. - */ - public ApplicationInsightsComponentProactiveDetectionConfigurationInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the enabled property: A flag that indicates whether this rule is enabled by the user. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: A flag that indicates whether this rule is enabled by the user. - * - * @param enabled the enabled value to set. - * @return the ApplicationInsightsComponentProactiveDetectionConfigurationInner object itself. - */ - public ApplicationInsightsComponentProactiveDetectionConfigurationInner withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the sendEmailsToSubscriptionOwners property: A flag that indicated whether notifications on this rule should - * be sent to subscription owners. - * - * @return the sendEmailsToSubscriptionOwners value. - */ - public Boolean sendEmailsToSubscriptionOwners() { - return this.sendEmailsToSubscriptionOwners; - } - - /** - * Set the sendEmailsToSubscriptionOwners property: A flag that indicated whether notifications on this rule should - * be sent to subscription owners. - * - * @param sendEmailsToSubscriptionOwners the sendEmailsToSubscriptionOwners value to set. - * @return the ApplicationInsightsComponentProactiveDetectionConfigurationInner object itself. - */ - public ApplicationInsightsComponentProactiveDetectionConfigurationInner withSendEmailsToSubscriptionOwners( - Boolean sendEmailsToSubscriptionOwners) { - this.sendEmailsToSubscriptionOwners = sendEmailsToSubscriptionOwners; - return this; - } - - /** - * Get the customEmails property: Custom email addresses for this rule notifications. - * - * @return the customEmails value. - */ - public List customEmails() { - return this.customEmails; - } - - /** - * Set the customEmails property: Custom email addresses for this rule notifications. - * - * @param customEmails the customEmails value to set. - * @return the ApplicationInsightsComponentProactiveDetectionConfigurationInner object itself. - */ - public ApplicationInsightsComponentProactiveDetectionConfigurationInner withCustomEmails( - List customEmails) { - this.customEmails = customEmails; - return this; - } - - /** - * Get the lastUpdatedTime property: The last time this rule was updated. - * - * @return the lastUpdatedTime value. - */ - public String lastUpdatedTime() { - return this.lastUpdatedTime; - } - - /** - * Set the lastUpdatedTime property: The last time this rule was updated. - * - * @param lastUpdatedTime the lastUpdatedTime value to set. - * @return the ApplicationInsightsComponentProactiveDetectionConfigurationInner object itself. - */ - public ApplicationInsightsComponentProactiveDetectionConfigurationInner withLastUpdatedTime( - String lastUpdatedTime) { - this.lastUpdatedTime = lastUpdatedTime; - return this; - } - - /** - * Get the ruleDefinitions property: Static definitions of the ProactiveDetection configuration rule (same values - * for all components). - * - * @return the ruleDefinitions value. - */ - public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions ruleDefinitions() { - return this.ruleDefinitions; - } - - /** - * Set the ruleDefinitions property: Static definitions of the ProactiveDetection configuration rule (same values - * for all components). - * - * @param ruleDefinitions the ruleDefinitions value to set. - * @return the ApplicationInsightsComponentProactiveDetectionConfigurationInner object itself. - */ - public ApplicationInsightsComponentProactiveDetectionConfigurationInner withRuleDefinitions( - ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions ruleDefinitions) { - this.ruleDefinitions = ruleDefinitions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ruleDefinitions() != null) { - ruleDefinitions().validate(); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentQuotaStatusInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentQuotaStatusInner.java deleted file mode 100644 index 3ffbc442170e0..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentQuotaStatusInner.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent.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; - -/** An Application Insights component daily data volume cap status. */ -@Immutable -public final class ApplicationInsightsComponentQuotaStatusInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentQuotaStatusInner.class); - - /* - * The Application ID for the Application Insights component. - */ - @JsonProperty(value = "AppId", access = JsonProperty.Access.WRITE_ONLY) - private String appId; - - /* - * The daily data volume cap is met, and data ingestion will be stopped. - */ - @JsonProperty(value = "ShouldBeThrottled", access = JsonProperty.Access.WRITE_ONLY) - private Boolean shouldBeThrottled; - - /* - * Date and time when the daily data volume cap will be reset, and data - * ingestion will resume. - */ - @JsonProperty(value = "ExpirationTime", access = JsonProperty.Access.WRITE_ONLY) - private String expirationTime; - - /** - * Get the appId property: The Application ID for the Application Insights component. - * - * @return the appId value. - */ - public String appId() { - return this.appId; - } - - /** - * Get the shouldBeThrottled property: The daily data volume cap is met, and data ingestion will be stopped. - * - * @return the shouldBeThrottled value. - */ - public Boolean shouldBeThrottled() { - return this.shouldBeThrottled; - } - - /** - * Get the expirationTime property: Date and time when the daily data volume cap will be reset, and data ingestion - * will resume. - * - * @return the expirationTime value. - */ - public String expirationTime() { - return this.expirationTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentWebTestLocationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentWebTestLocationInner.java deleted file mode 100644 index b5b2f868bbec4..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentWebTestLocationInner.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent.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; - -/** Properties that define a web test location available to an Application Insights Component. */ -@Immutable -public final class ApplicationInsightsComponentWebTestLocationInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentWebTestLocationInner.class); - - /* - * The display name of the web test location. - */ - @JsonProperty(value = "DisplayName", access = JsonProperty.Access.WRITE_ONLY) - private String displayName; - - /* - * Internally defined geographic location tag. - */ - @JsonProperty(value = "Tag", access = JsonProperty.Access.WRITE_ONLY) - private String tag; - - /** - * Get the displayName property: The display name of the web test location. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Get the tag property: Internally defined geographic location tag. - * - * @return the tag value. - */ - public String tag() { - return this.tag; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeResponseInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeResponseInner.java deleted file mode 100644 index a3fd0f627b1c7..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeResponseInner.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** Response containing operationId for a specific purge action. */ -@Fluent -public final class ComponentPurgeResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ComponentPurgeResponseInner.class); - - /* - * Id to use when querying for status for a particular purge operation. - */ - @JsonProperty(value = "operationId", required = true) - private String operationId; - - /** - * Get the operationId property: Id to use when querying for status for a particular purge operation. - * - * @return the operationId value. - */ - public String operationId() { - return this.operationId; - } - - /** - * Set the operationId property: Id to use when querying for status for a particular purge operation. - * - * @param operationId the operationId value to set. - * @return the ComponentPurgeResponseInner object itself. - */ - public ComponentPurgeResponseInner withOperationId(String operationId) { - this.operationId = operationId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (operationId() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property operationId in model ComponentPurgeResponseInner")); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeStatusResponseInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeStatusResponseInner.java deleted file mode 100644 index b187c76338113..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeStatusResponseInner.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.models.PurgeState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Response containing status for a specific purge operation. */ -@Fluent -public final class ComponentPurgeStatusResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ComponentPurgeStatusResponseInner.class); - - /* - * Status of the operation represented by the requested Id. - */ - @JsonProperty(value = "status", required = true) - private PurgeState status; - - /** - * Get the status property: Status of the operation represented by the requested Id. - * - * @return the status value. - */ - public PurgeState status() { - return this.status; - } - - /** - * Set the status property: Status of the operation represented by the requested Id. - * - * @param status the status value to set. - * @return the ComponentPurgeStatusResponseInner object itself. - */ - public ComponentPurgeStatusResponseInner withStatus(PurgeState status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (status() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property status in model ComponentPurgeStatusResponseInner")); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookInner.java deleted file mode 100644 index f475ac944cceb..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookInner.java +++ /dev/null @@ -1,331 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.models.Kind; -import com.azure.resourcemanager.applicationinsights.models.ManagedIdentity; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbookResource; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** An Application Insights private workbook definition. */ -@JsonFlatten -@Fluent -public class MyWorkbookInner extends MyWorkbookResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MyWorkbookInner.class); - - /* - * The kind of workbook. Choices are user and shared. - */ - @JsonProperty(value = "kind") - private Kind kind; - - /* - * The user-defined name of the private workbook. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /* - * Configuration of this particular private workbook. Configuration data is - * a string containing valid JSON - */ - @JsonProperty(value = "properties.serializedData") - private String serializedData; - - /* - * This instance's version of the data model. This can change as new - * features are added that can be marked private workbook. - */ - @JsonProperty(value = "properties.version") - private String version; - - /* - * Date and time in UTC of the last modification that was made to this - * private workbook definition. - */ - @JsonProperty(value = "properties.timeModified", access = JsonProperty.Access.WRITE_ONLY) - private String timeModified; - - /* - * Workbook category, as defined by the user at creation time. - */ - @JsonProperty(value = "properties.category") - private String category; - - /* - * A list of 0 or more tags that are associated with this private workbook - * definition - */ - @JsonProperty(value = "properties.tags") - private List tagsPropertiesTags; - - /* - * Unique user id of the specific user that owns this private workbook. - */ - @JsonProperty(value = "properties.userId", access = JsonProperty.Access.WRITE_ONLY) - private String userId; - - /* - * Optional resourceId for a source resource. - */ - @JsonProperty(value = "properties.sourceId") - private String sourceId; - - /* - * BYOS Storage Account URI - */ - @JsonProperty(value = "properties.storageUri") - private String storageUri; - - /** - * Get the kind property: The kind of workbook. Choices are user and shared. - * - * @return the kind value. - */ - public Kind kind() { - return this.kind; - } - - /** - * Set the kind property: The kind of workbook. Choices are user and shared. - * - * @param kind the kind value to set. - * @return the MyWorkbookInner object itself. - */ - public MyWorkbookInner withKind(Kind kind) { - this.kind = kind; - return this; - } - - /** - * Get the displayName property: The user-defined name of the private workbook. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The user-defined name of the private workbook. - * - * @param displayName the displayName value to set. - * @return the MyWorkbookInner object itself. - */ - public MyWorkbookInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the serializedData property: Configuration of this particular private workbook. Configuration data is a - * string containing valid JSON. - * - * @return the serializedData value. - */ - public String serializedData() { - return this.serializedData; - } - - /** - * Set the serializedData property: Configuration of this particular private workbook. Configuration data is a - * string containing valid JSON. - * - * @param serializedData the serializedData value to set. - * @return the MyWorkbookInner object itself. - */ - public MyWorkbookInner withSerializedData(String serializedData) { - this.serializedData = serializedData; - return this; - } - - /** - * Get the version property: This instance's version of the data model. This can change as new features are added - * that can be marked private workbook. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: This instance's version of the data model. This can change as new features are added - * that can be marked private workbook. - * - * @param version the version value to set. - * @return the MyWorkbookInner object itself. - */ - public MyWorkbookInner withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the timeModified property: Date and time in UTC of the last modification that was made to this private - * workbook definition. - * - * @return the timeModified value. - */ - public String timeModified() { - return this.timeModified; - } - - /** - * Get the category property: Workbook category, as defined by the user at creation time. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: Workbook category, as defined by the user at creation time. - * - * @param category the category value to set. - * @return the MyWorkbookInner object itself. - */ - public MyWorkbookInner withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the tagsPropertiesTags property: A list of 0 or more tags that are associated with this private workbook - * definition. - * - * @return the tagsPropertiesTags value. - */ - public List tagsPropertiesTags() { - return this.tagsPropertiesTags; - } - - /** - * Set the tagsPropertiesTags property: A list of 0 or more tags that are associated with this private workbook - * definition. - * - * @param tagsPropertiesTags the tagsPropertiesTags value to set. - * @return the MyWorkbookInner object itself. - */ - public MyWorkbookInner withTagsPropertiesTags(List tagsPropertiesTags) { - this.tagsPropertiesTags = tagsPropertiesTags; - return this; - } - - /** - * Get the userId property: Unique user id of the specific user that owns this private workbook. - * - * @return the userId value. - */ - public String userId() { - return this.userId; - } - - /** - * Get the sourceId property: Optional resourceId for a source resource. - * - * @return the sourceId value. - */ - public String sourceId() { - return this.sourceId; - } - - /** - * Set the sourceId property: Optional resourceId for a source resource. - * - * @param sourceId the sourceId value to set. - * @return the MyWorkbookInner object itself. - */ - public MyWorkbookInner withSourceId(String sourceId) { - this.sourceId = sourceId; - return this; - } - - /** - * Get the storageUri property: BYOS Storage Account URI. - * - * @return the storageUri value. - */ - public String storageUri() { - return this.storageUri; - } - - /** - * Set the storageUri property: BYOS Storage Account URI. - * - * @param storageUri the storageUri value to set. - * @return the MyWorkbookInner object itself. - */ - public MyWorkbookInner withStorageUri(String storageUri) { - this.storageUri = storageUri; - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookInner withIdentity(ManagedIdentity identity) { - super.withIdentity(identity); - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookInner withId(String id) { - super.withId(id); - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookInner withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookInner withType(String type) { - super.withType(type); - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookInner withEtag(Map etag) { - super.withEtag(etag); - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/OperationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/OperationInner.java deleted file mode 100644 index 2952d50f4b29f..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/OperationInner.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.models.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Workbooks REST API operation. */ -@Fluent -public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - - /* - * Operation name: {provider}/{resource}/{operation} - */ - @JsonProperty(value = "name") - private String name; - - /* - * The object that represents the operation. - */ - @JsonProperty(value = "display") - private OperationDisplay display; - - /** - * Get the name property: Operation name: {provider}/{resource}/{operation}. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Operation name: {provider}/{resource}/{operation}. - * - * @param name the name value to set. - * @return the OperationInner object itself. - */ - public OperationInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display property: The object that represents the operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display property: The object that represents the operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestInner.java deleted file mode 100644 index 46f91d3baadc8..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestInner.java +++ /dev/null @@ -1,368 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.models.WebTestGeolocation; -import com.azure.resourcemanager.applicationinsights.models.WebTestKind; -import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesConfiguration; -import com.azure.resourcemanager.applicationinsights.models.WebtestsResource; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** An Application Insights web test definition. */ -@JsonFlatten -@Fluent -public class WebTestInner extends WebtestsResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebTestInner.class); - - /* - * The kind of web test that this web test watches. Choices are ping and - * multistep. - */ - @JsonProperty(value = "kind") - private WebTestKind kind; - - /* - * Unique ID of this WebTest. This is typically the same value as the Name - * field. - */ - @JsonProperty(value = "properties.SyntheticMonitorId") - private String syntheticMonitorId; - - /* - * User defined name if this WebTest. - */ - @JsonProperty(value = "properties.Name") - private String webTestName; - - /* - * Purpose/user defined descriptive test for this WebTest. - */ - @JsonProperty(value = "properties.Description") - private String description; - - /* - * Is the test actively being monitored. - */ - @JsonProperty(value = "properties.Enabled") - private Boolean enabled; - - /* - * Interval in seconds between test runs for this WebTest. Default value is - * 300. - */ - @JsonProperty(value = "properties.Frequency") - private Integer frequency; - - /* - * Seconds until this WebTest will timeout and fail. Default value is 30. - */ - @JsonProperty(value = "properties.Timeout") - private Integer timeout; - - /* - * The kind of web test this is, valid choices are ping and multistep. - */ - @JsonProperty(value = "properties.Kind") - private WebTestKind webTestKind; - - /* - * Allow for retries should this WebTest fail. - */ - @JsonProperty(value = "properties.RetryEnabled") - private Boolean retryEnabled; - - /* - * A list of where to physically run the tests from to give global coverage - * for accessibility of your application. - */ - @JsonProperty(value = "properties.Locations") - private List locations; - - /* - * An XML configuration specification for a WebTest. - */ - @JsonProperty(value = "properties.Configuration") - private WebTestPropertiesConfiguration configuration; - - /* - * Current state of this component, whether or not is has been provisioned - * within the resource group it is defined. Users cannot change this value - * but are able to read from it. Values will include Succeeded, Deploying, - * Canceled, and Failed. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * Get the kind property: The kind of web test that this web test watches. Choices are ping and multistep. - * - * @return the kind value. - */ - public WebTestKind kind() { - return this.kind; - } - - /** - * Set the kind property: The kind of web test that this web test watches. Choices are ping and multistep. - * - * @param kind the kind value to set. - * @return the WebTestInner object itself. - */ - public WebTestInner withKind(WebTestKind kind) { - this.kind = kind; - return this; - } - - /** - * Get the syntheticMonitorId property: Unique ID of this WebTest. This is typically the same value as the Name - * field. - * - * @return the syntheticMonitorId value. - */ - public String syntheticMonitorId() { - return this.syntheticMonitorId; - } - - /** - * Set the syntheticMonitorId property: Unique ID of this WebTest. This is typically the same value as the Name - * field. - * - * @param syntheticMonitorId the syntheticMonitorId value to set. - * @return the WebTestInner object itself. - */ - public WebTestInner withSyntheticMonitorId(String syntheticMonitorId) { - this.syntheticMonitorId = syntheticMonitorId; - return this; - } - - /** - * Get the webTestName property: User defined name if this WebTest. - * - * @return the webTestName value. - */ - public String webTestName() { - return this.webTestName; - } - - /** - * Set the webTestName property: User defined name if this WebTest. - * - * @param webTestName the webTestName value to set. - * @return the WebTestInner object itself. - */ - public WebTestInner withWebTestName(String webTestName) { - this.webTestName = webTestName; - return this; - } - - /** - * Get the description property: Purpose/user defined descriptive test for this WebTest. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Purpose/user defined descriptive test for this WebTest. - * - * @param description the description value to set. - * @return the WebTestInner object itself. - */ - public WebTestInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the enabled property: Is the test actively being monitored. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Is the test actively being monitored. - * - * @param enabled the enabled value to set. - * @return the WebTestInner object itself. - */ - public WebTestInner withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the frequency property: Interval in seconds between test runs for this WebTest. Default value is 300. - * - * @return the frequency value. - */ - public Integer frequency() { - return this.frequency; - } - - /** - * Set the frequency property: Interval in seconds between test runs for this WebTest. Default value is 300. - * - * @param frequency the frequency value to set. - * @return the WebTestInner object itself. - */ - public WebTestInner withFrequency(Integer frequency) { - this.frequency = frequency; - return this; - } - - /** - * Get the timeout property: Seconds until this WebTest will timeout and fail. Default value is 30. - * - * @return the timeout value. - */ - public Integer timeout() { - return this.timeout; - } - - /** - * Set the timeout property: Seconds until this WebTest will timeout and fail. Default value is 30. - * - * @param timeout the timeout value to set. - * @return the WebTestInner object itself. - */ - public WebTestInner withTimeout(Integer timeout) { - this.timeout = timeout; - return this; - } - - /** - * Get the webTestKind property: The kind of web test this is, valid choices are ping and multistep. - * - * @return the webTestKind value. - */ - public WebTestKind webTestKind() { - return this.webTestKind; - } - - /** - * Set the webTestKind property: The kind of web test this is, valid choices are ping and multistep. - * - * @param webTestKind the webTestKind value to set. - * @return the WebTestInner object itself. - */ - public WebTestInner withWebTestKind(WebTestKind webTestKind) { - this.webTestKind = webTestKind; - return this; - } - - /** - * Get the retryEnabled property: Allow for retries should this WebTest fail. - * - * @return the retryEnabled value. - */ - public Boolean retryEnabled() { - return this.retryEnabled; - } - - /** - * Set the retryEnabled property: Allow for retries should this WebTest fail. - * - * @param retryEnabled the retryEnabled value to set. - * @return the WebTestInner object itself. - */ - public WebTestInner withRetryEnabled(Boolean retryEnabled) { - this.retryEnabled = retryEnabled; - return this; - } - - /** - * Get the locations property: A list of where to physically run the tests from to give global coverage for - * accessibility of your application. - * - * @return the locations value. - */ - public List locations() { - return this.locations; - } - - /** - * Set the locations property: A list of where to physically run the tests from to give global coverage for - * accessibility of your application. - * - * @param locations the locations value to set. - * @return the WebTestInner object itself. - */ - public WebTestInner withLocations(List locations) { - this.locations = locations; - return this; - } - - /** - * Get the configuration property: An XML configuration specification for a WebTest. - * - * @return the configuration value. - */ - public WebTestPropertiesConfiguration configuration() { - return this.configuration; - } - - /** - * Set the configuration property: An XML configuration specification for a WebTest. - * - * @param configuration the configuration value to set. - * @return the WebTestInner object itself. - */ - public WebTestInner withConfiguration(WebTestPropertiesConfiguration configuration) { - this.configuration = configuration; - return this; - } - - /** - * Get the provisioningState property: Current state of this component, whether or not is has been provisioned - * within the resource group it is defined. Users cannot change this value but are able to read from it. Values will - * include Succeeded, Deploying, Canceled, and Failed. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** {@inheritDoc} */ - @Override - public WebTestInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public WebTestInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (locations() != null) { - locations().forEach(e -> e.validate()); - } - if (configuration() != null) { - configuration().validate(); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkItemConfigurationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkItemConfigurationInner.java deleted file mode 100644 index 8fe88c790d1f7..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkItemConfigurationInner.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** Work item configuration associated with an application insights resource. */ -@Fluent -public final class WorkItemConfigurationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkItemConfigurationInner.class); - - /* - * Connector identifier where work item is created - */ - @JsonProperty(value = "ConnectorId") - private String connectorId; - - /* - * Configuration friendly name - */ - @JsonProperty(value = "ConfigDisplayName") - private String configDisplayName; - - /* - * Boolean value indicating whether configuration is default - */ - @JsonProperty(value = "IsDefault") - private Boolean isDefault; - - /* - * Unique Id for work item - */ - @JsonProperty(value = "Id") - private String id; - - /* - * Serialized JSON object for detailed properties - */ - @JsonProperty(value = "ConfigProperties") - private String configProperties; - - /** - * Get the connectorId property: Connector identifier where work item is created. - * - * @return the connectorId value. - */ - public String connectorId() { - return this.connectorId; - } - - /** - * Set the connectorId property: Connector identifier where work item is created. - * - * @param connectorId the connectorId value to set. - * @return the WorkItemConfigurationInner object itself. - */ - public WorkItemConfigurationInner withConnectorId(String connectorId) { - this.connectorId = connectorId; - return this; - } - - /** - * Get the configDisplayName property: Configuration friendly name. - * - * @return the configDisplayName value. - */ - public String configDisplayName() { - return this.configDisplayName; - } - - /** - * Set the configDisplayName property: Configuration friendly name. - * - * @param configDisplayName the configDisplayName value to set. - * @return the WorkItemConfigurationInner object itself. - */ - public WorkItemConfigurationInner withConfigDisplayName(String configDisplayName) { - this.configDisplayName = configDisplayName; - return this; - } - - /** - * Get the isDefault property: Boolean value indicating whether configuration is default. - * - * @return the isDefault value. - */ - public Boolean isDefault() { - return this.isDefault; - } - - /** - * Set the isDefault property: Boolean value indicating whether configuration is default. - * - * @param isDefault the isDefault value to set. - * @return the WorkItemConfigurationInner object itself. - */ - public WorkItemConfigurationInner withIsDefault(Boolean isDefault) { - this.isDefault = isDefault; - return this; - } - - /** - * Get the id property: Unique Id for work item. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Unique Id for work item. - * - * @param id the id value to set. - * @return the WorkItemConfigurationInner object itself. - */ - public WorkItemConfigurationInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the configProperties property: Serialized JSON object for detailed properties. - * - * @return the configProperties value. - */ - public String configProperties() { - return this.configProperties; - } - - /** - * Set the configProperties property: Serialized JSON object for detailed properties. - * - * @param configProperties the configProperties value to set. - * @return the WorkItemConfigurationInner object itself. - */ - public WorkItemConfigurationInner withConfigProperties(String configProperties) { - this.configProperties = configProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookInner.java deleted file mode 100644 index f9540794682f4..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookInner.java +++ /dev/null @@ -1,422 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.models.Kind; -import com.azure.resourcemanager.applicationinsights.models.ManagedIdentityAutoGenerated; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** An Application Insights workbook definition. */ -@JsonFlatten -@Fluent -public class WorkbookInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbookInner.class); - - /* - * The kind of workbook. Choices are user and shared. - */ - @JsonProperty(value = "kind") - private Kind kind; - - /* - * The user-defined name (display name) of the workbook. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /* - * Configuration of this particular workbook. Configuration data is a - * string containing valid JSON - */ - @JsonProperty(value = "properties.serializedData") - private String serializedData; - - /* - * Workbook version - */ - @JsonProperty(value = "properties.version") - private String version; - - /* - * Date and time in UTC of the last modification that was made to this - * workbook definition. - */ - @JsonProperty(value = "properties.timeModified", access = JsonProperty.Access.WRITE_ONLY) - private String timeModified; - - /* - * Workbook category, as defined by the user at creation time. - */ - @JsonProperty(value = "properties.category") - private String category; - - /* - * A list of 0 or more tags that are associated with this workbook - * definition - */ - @JsonProperty(value = "properties.tags") - private List tagsPropertiesTags; - - /* - * Unique user id of the specific user that owns this workbook. - */ - @JsonProperty(value = "properties.userId", access = JsonProperty.Access.WRITE_ONLY) - private String userId; - - /* - * ResourceId for a source resource. - */ - @JsonProperty(value = "properties.sourceId") - private String sourceId; - - /* - * BYOS Storage Account URI - */ - @JsonProperty(value = "properties.storageUri") - private String storageUri; - - /* - * Identity used for BYOS - */ - @JsonProperty(value = "identity") - private ManagedIdentityAutoGenerated identity; - - /* - * Resource etag - */ - @JsonProperty(value = "etag") - private Map etag; - - /* - * Azure resource Id - */ - @JsonProperty(value = "id") - private String id; - - /* - * Azure resource name - */ - @JsonProperty(value = "name") - private String name; - - /* - * Azure resource type - */ - @JsonProperty(value = "type") - private String type; - - /** - * Get the kind property: The kind of workbook. Choices are user and shared. - * - * @return the kind value. - */ - public Kind kind() { - return this.kind; - } - - /** - * Set the kind property: The kind of workbook. Choices are user and shared. - * - * @param kind the kind value to set. - * @return the WorkbookInner object itself. - */ - public WorkbookInner withKind(Kind kind) { - this.kind = kind; - return this; - } - - /** - * Get the displayName property: The user-defined name (display name) of the workbook. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The user-defined name (display name) of the workbook. - * - * @param displayName the displayName value to set. - * @return the WorkbookInner object itself. - */ - public WorkbookInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the serializedData property: Configuration of this particular workbook. Configuration data is a string - * containing valid JSON. - * - * @return the serializedData value. - */ - public String serializedData() { - return this.serializedData; - } - - /** - * Set the serializedData property: Configuration of this particular workbook. Configuration data is a string - * containing valid JSON. - * - * @param serializedData the serializedData value to set. - * @return the WorkbookInner object itself. - */ - public WorkbookInner withSerializedData(String serializedData) { - this.serializedData = serializedData; - return this; - } - - /** - * Get the version property: Workbook version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Workbook version. - * - * @param version the version value to set. - * @return the WorkbookInner object itself. - */ - public WorkbookInner withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the timeModified property: Date and time in UTC of the last modification that was made to this workbook - * definition. - * - * @return the timeModified value. - */ - public String timeModified() { - return this.timeModified; - } - - /** - * Get the category property: Workbook category, as defined by the user at creation time. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: Workbook category, as defined by the user at creation time. - * - * @param category the category value to set. - * @return the WorkbookInner object itself. - */ - public WorkbookInner withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the tagsPropertiesTags property: A list of 0 or more tags that are associated with this workbook definition. - * - * @return the tagsPropertiesTags value. - */ - public List tagsPropertiesTags() { - return this.tagsPropertiesTags; - } - - /** - * Set the tagsPropertiesTags property: A list of 0 or more tags that are associated with this workbook definition. - * - * @param tagsPropertiesTags the tagsPropertiesTags value to set. - * @return the WorkbookInner object itself. - */ - public WorkbookInner withTagsPropertiesTags(List tagsPropertiesTags) { - this.tagsPropertiesTags = tagsPropertiesTags; - return this; - } - - /** - * Get the userId property: Unique user id of the specific user that owns this workbook. - * - * @return the userId value. - */ - public String userId() { - return this.userId; - } - - /** - * Get the sourceId property: ResourceId for a source resource. - * - * @return the sourceId value. - */ - public String sourceId() { - return this.sourceId; - } - - /** - * Set the sourceId property: ResourceId for a source resource. - * - * @param sourceId the sourceId value to set. - * @return the WorkbookInner object itself. - */ - public WorkbookInner withSourceId(String sourceId) { - this.sourceId = sourceId; - return this; - } - - /** - * Get the storageUri property: BYOS Storage Account URI. - * - * @return the storageUri value. - */ - public String storageUri() { - return this.storageUri; - } - - /** - * Set the storageUri property: BYOS Storage Account URI. - * - * @param storageUri the storageUri value to set. - * @return the WorkbookInner object itself. - */ - public WorkbookInner withStorageUri(String storageUri) { - this.storageUri = storageUri; - return this; - } - - /** - * Get the identity property: Identity used for BYOS. - * - * @return the identity value. - */ - public ManagedIdentityAutoGenerated identity() { - return this.identity; - } - - /** - * Set the identity property: Identity used for BYOS. - * - * @param identity the identity value to set. - * @return the WorkbookInner object itself. - */ - public WorkbookInner withIdentity(ManagedIdentityAutoGenerated identity) { - this.identity = identity; - return this; - } - - /** - * Get the etag property: Resource etag. - * - * @return the etag value. - */ - public Map etag() { - return this.etag; - } - - /** - * Set the etag property: Resource etag. - * - * @param etag the etag value to set. - * @return the WorkbookInner object itself. - */ - public WorkbookInner withEtag(Map etag) { - this.etag = etag; - return this; - } - - /** - * Get the id property: Azure resource Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Azure resource Id. - * - * @param id the id value to set. - * @return the WorkbookInner object itself. - */ - public WorkbookInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Azure resource name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Azure resource name. - * - * @param name the name value to set. - * @return the WorkbookInner object itself. - */ - public WorkbookInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: Azure resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Azure resource type. - * - * @param type the type value to set. - * @return the WorkbookInner object itself. - */ - public WorkbookInner withType(String type) { - this.type = type; - return this; - } - - /** {@inheritDoc} */ - @Override - public WorkbookInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public WorkbookInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateInner.java new file mode 100644 index 0000000000000..4bf192dd9ec00 --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateInner.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateGallery; +import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateLocalizedGallery; +import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** An Application Insights workbook template definition. */ +@JsonFlatten +@Fluent +public class WorkbookTemplateInner extends WorkbookTemplateResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbookTemplateInner.class); + + /* + * Priority of the template. Determines which template to open when a + * workbook gallery is opened in viewer mode. + */ + @JsonProperty(value = "properties.priority") + private Integer priority; + + /* + * Information about the author of the workbook template. + */ + @JsonProperty(value = "properties.author") + private String author; + + /* + * Valid JSON object containing workbook template payload. + */ + @JsonProperty(value = "properties.templateData") + private Object templateData; + + /* + * Workbook galleries supported by the template. + */ + @JsonProperty(value = "properties.galleries") + private List galleries; + + /* + * Key value pair of localized gallery. Each key is the locale code of + * languages supported by the Azure portal. + */ + @JsonProperty(value = "properties.localized") + private Map> localized; + + /** + * Get the priority property: Priority of the template. Determines which template to open when a workbook gallery is + * opened in viewer mode. + * + * @return the priority value. + */ + public Integer priority() { + return this.priority; + } + + /** + * Set the priority property: Priority of the template. Determines which template to open when a workbook gallery is + * opened in viewer mode. + * + * @param priority the priority value to set. + * @return the WorkbookTemplateInner object itself. + */ + public WorkbookTemplateInner withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get the author property: Information about the author of the workbook template. + * + * @return the author value. + */ + public String author() { + return this.author; + } + + /** + * Set the author property: Information about the author of the workbook template. + * + * @param author the author value to set. + * @return the WorkbookTemplateInner object itself. + */ + public WorkbookTemplateInner withAuthor(String author) { + this.author = author; + return this; + } + + /** + * Get the templateData property: Valid JSON object containing workbook template payload. + * + * @return the templateData value. + */ + public Object templateData() { + return this.templateData; + } + + /** + * Set the templateData property: Valid JSON object containing workbook template payload. + * + * @param templateData the templateData value to set. + * @return the WorkbookTemplateInner object itself. + */ + public WorkbookTemplateInner withTemplateData(Object templateData) { + this.templateData = templateData; + return this; + } + + /** + * Get the galleries property: Workbook galleries supported by the template. + * + * @return the galleries value. + */ + public List galleries() { + return this.galleries; + } + + /** + * Set the galleries property: Workbook galleries supported by the template. + * + * @param galleries the galleries value to set. + * @return the WorkbookTemplateInner object itself. + */ + public WorkbookTemplateInner withGalleries(List galleries) { + this.galleries = galleries; + return this; + } + + /** + * Get the localized property: Key value pair of localized gallery. Each key is the locale code of languages + * supported by the Azure portal. + * + * @return the localized value. + */ + public Map> localized() { + return this.localized; + } + + /** + * Set the localized property: Key value pair of localized gallery. Each key is the locale code of languages + * supported by the Azure portal. + * + * @param localized the localized value to set. + * @return the WorkbookTemplateInner object itself. + */ + public WorkbookTemplateInner withLocalized(Map> localized) { + this.localized = localized; + return this; + } + + /** {@inheritDoc} */ + @Override + public WorkbookTemplateInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public WorkbookTemplateInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (galleries() != null) { + galleries().forEach(e -> e.validate()); + } + if (localized() != null) { + localized() + .values() + .forEach( + e -> { + if (e != null) { + e.forEach(e1 -> e1.validate()); + } + }); + } + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsClientImpl.java deleted file mode 100644 index cafef071c9e50..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsClientImpl.java +++ /dev/null @@ -1,1071 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -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.applicationinsights.fluent.AnalyticsItemsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAnalyticsItemInner; -import com.azure.resourcemanager.applicationinsights.models.ItemScope; -import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; -import com.azure.resourcemanager.applicationinsights.models.ItemTypeParameter; -import java.util.List; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in AnalyticsItemsClient. */ -public final class AnalyticsItemsClientImpl implements AnalyticsItemsClient { - private final ClientLogger logger = new ClientLogger(AnalyticsItemsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final AnalyticsItemsService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of AnalyticsItemsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AnalyticsItemsClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(AnalyticsItemsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientAnalyticsItems to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - private interface AnalyticsItemsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components" - + "/{resourceName}/{scopePath}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @PathParam("scopePath") ItemScopePath scopePath, - @QueryParam("api-version") String apiVersion, - @QueryParam("scope") ItemScope scope, - @QueryParam("type") ItemTypeParameter type, - @QueryParam("includeContent") Boolean includeContent, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components" - + "/{resourceName}/{scopePath}/item") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @PathParam("scopePath") ItemScopePath scopePath, - @QueryParam("api-version") String apiVersion, - @QueryParam("id") String id, - @QueryParam("name") String name, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components" - + "/{resourceName}/{scopePath}/item") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> put( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @PathParam("scopePath") ItemScopePath scopePath, - @QueryParam("api-version") String apiVersion, - @QueryParam("overrideItem") Boolean overrideItem, - @BodyParam("application/json") ApplicationInsightsComponentAnalyticsItemInner itemProperties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components" - + "/{resourceName}/{scopePath}/item") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @PathParam("scopePath") ItemScopePath scopePath, - @QueryParam("api-version") String apiVersion, - @QueryParam("id") String id, - @QueryParam("name") String name, - Context context); - } - - /** - * Gets a list of Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param scope Enum indicating if this item definition is owned by a specific user or is shared between all users - * with access to the Application Insights component. - * @param type Enum indicating the type of the Analytics item. - * @param includeContent Flag indicating whether or not to return the content of each applicable item. If false, - * only return the item information. - * @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 Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listWithResponseAsync( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ItemScope scope, - ItemTypeParameter type, - Boolean includeContent) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (scopePath == null) { - return Mono.error(new IllegalArgumentException("Parameter scopePath is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - scopePath, - apiVersion, - scope, - type, - includeContent, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param scope Enum indicating if this item definition is owned by a specific user or is shared between all users - * with access to the Application Insights component. - * @param type Enum indicating the type of the Analytics item. - * @param includeContent Flag indicating whether or not to return the content of each applicable item. If false, - * only return the item information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listWithResponseAsync( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ItemScope scope, - ItemTypeParameter type, - Boolean includeContent, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (scopePath == null) { - return Mono.error(new IllegalArgumentException("Parameter scopePath is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - scopePath, - apiVersion, - scope, - type, - includeContent, - accept, - context); - } - - /** - * Gets a list of Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param scope Enum indicating if this item definition is owned by a specific user or is shared between all users - * with access to the Application Insights component. - * @param type Enum indicating the type of the Analytics item. - * @param includeContent Flag indicating whether or not to return the content of each applicable item. If false, - * only return the item information. - * @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 Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAsync( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ItemScope scope, - ItemTypeParameter type, - Boolean includeContent) { - return listWithResponseAsync(resourceGroupName, resourceName, scopePath, scope, type, includeContent) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a list of Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @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 Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAsync( - String resourceGroupName, String resourceName, ItemScopePath scopePath) { - final ItemScope scope = null; - final ItemTypeParameter type = null; - final Boolean includeContent = null; - return listWithResponseAsync(resourceGroupName, resourceName, scopePath, scope, type, includeContent) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a list of Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @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 Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List list( - String resourceGroupName, String resourceName, ItemScopePath scopePath) { - final ItemScope scope = null; - final ItemTypeParameter type = null; - final Boolean includeContent = null; - return listAsync(resourceGroupName, resourceName, scopePath, scope, type, includeContent).block(); - } - - /** - * Gets a list of Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param scope Enum indicating if this item definition is owned by a specific user or is shared between all users - * with access to the Application Insights component. - * @param type Enum indicating the type of the Analytics item. - * @param includeContent Flag indicating whether or not to return the content of each applicable item. If false, - * only return the item information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ItemScope scope, - ItemTypeParameter type, - Boolean includeContent, - Context context) { - return listWithResponseAsync(resourceGroupName, resourceName, scopePath, scope, type, includeContent, context) - .block(); - } - - /** - * Gets a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param id The Id of a specific item defined in the Application Insights component. - * @param name The name of a specific item defined in the Application Insights component. - * @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 specific Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, ItemScopePath scopePath, String id, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (scopePath == null) { - return Mono.error(new IllegalArgumentException("Parameter scopePath is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - scopePath, - apiVersion, - id, - name, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param id The Id of a specific item defined in the Application Insights component. - * @param name The name of a specific item defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (scopePath == null) { - return Mono.error(new IllegalArgumentException("Parameter scopePath is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - scopePath, - apiVersion, - id, - name, - accept, - context); - } - - /** - * Gets a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param id The Id of a specific item defined in the Application Insights component. - * @param name The name of a specific item defined in the Application Insights component. - * @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 specific Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName, ItemScopePath scopePath, String id, String name) { - return getWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @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 specific Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName, ItemScopePath scopePath) { - final String id = null; - final String name = null; - return getWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @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 specific Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentAnalyticsItemInner get( - String resourceGroupName, String resourceName, ItemScopePath scopePath) { - final String id = null; - final String name = null; - return getAsync(resourceGroupName, resourceName, scopePath, id, name).block(); - } - - /** - * Gets a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param id The Id of a specific item defined in the Application Insights component. - * @param name The name of a specific item defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name, context).block(); - } - - /** - * Adds or Updates a specific Analytics Item within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param itemProperties Properties that need to be specified to create a new item and add it to an Application - * Insights component. - * @param overrideItem Flag indicating whether or not to force save an item. This allows overriding an item if it - * already exists. - * @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 properties that define an Analytics item that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties, - Boolean overrideItem) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (scopePath == null) { - return Mono.error(new IllegalArgumentException("Parameter scopePath is required and cannot be null.")); - } - if (itemProperties == null) { - return Mono.error(new IllegalArgumentException("Parameter itemProperties is required and cannot be null.")); - } else { - itemProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .put( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - scopePath, - apiVersion, - overrideItem, - itemProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Adds or Updates a specific Analytics Item within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param itemProperties Properties that need to be specified to create a new item and add it to an Application - * Insights component. - * @param overrideItem Flag indicating whether or not to force save an item. This allows overriding an item if it - * already exists. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define an Analytics item that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties, - Boolean overrideItem, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (scopePath == null) { - return Mono.error(new IllegalArgumentException("Parameter scopePath is required and cannot be null.")); - } - if (itemProperties == null) { - return Mono.error(new IllegalArgumentException("Parameter itemProperties is required and cannot be null.")); - } else { - itemProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .put( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - scopePath, - apiVersion, - overrideItem, - itemProperties, - accept, - context); - } - - /** - * Adds or Updates a specific Analytics Item within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param itemProperties Properties that need to be specified to create a new item and add it to an Application - * Insights component. - * @param overrideItem Flag indicating whether or not to force save an item. This allows overriding an item if it - * already exists. - * @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 properties that define an Analytics item that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono putAsync( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties, - Boolean overrideItem) { - return putWithResponseAsync(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Adds or Updates a specific Analytics Item within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param itemProperties Properties that need to be specified to create a new item and add it to an Application - * Insights component. - * @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 properties that define an Analytics item that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono putAsync( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties) { - final Boolean overrideItem = null; - return putWithResponseAsync(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Adds or Updates a specific Analytics Item within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param itemProperties Properties that need to be specified to create a new item and add it to an Application - * Insights component. - * @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 properties that define an Analytics item that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentAnalyticsItemInner put( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties) { - final Boolean overrideItem = null; - return putAsync(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem).block(); - } - - /** - * Adds or Updates a specific Analytics Item within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param itemProperties Properties that need to be specified to create a new item and add it to an Application - * Insights component. - * @param overrideItem Flag indicating whether or not to force save an item. This allows overriding an item if it - * already exists. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define an Analytics item that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response putWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties, - Boolean overrideItem, - Context context) { - return putWithResponseAsync(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem, context) - .block(); - } - - /** - * Deletes a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param id The Id of a specific item defined in the Application Insights component. - * @param name The name of a specific item defined in the Application Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, ItemScopePath scopePath, String id, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (scopePath == null) { - return Mono.error(new IllegalArgumentException("Parameter scopePath is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - scopePath, - apiVersion, - id, - name, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param id The Id of a specific item defined in the Application Insights component. - * @param name The name of a specific item defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (scopePath == null) { - return Mono.error(new IllegalArgumentException("Parameter scopePath is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - scopePath, - apiVersion, - id, - name, - context); - } - - /** - * Deletes a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param id The Id of a specific item defined in the Application Insights component. - * @param name The name of a specific item defined in the Application Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String resourceName, ItemScopePath scopePath, String id, String name) { - return deleteWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName, ItemScopePath scopePath) { - final String id = null; - final String name = null; - return deleteWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, ItemScopePath scopePath) { - final String id = null; - final String name = null; - deleteAsync(resourceGroupName, resourceName, scopePath, id, name).block(); - } - - /** - * Deletes a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param id The Id of a specific item defined in the Application Insights component. - * @param name The name of a specific item defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name, context).block(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsImpl.java deleted file mode 100644 index c04b63abecced..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsImpl.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.AnalyticsItemsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAnalyticsItemInner; -import com.azure.resourcemanager.applicationinsights.models.AnalyticsItems; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentAnalyticsItem; -import com.azure.resourcemanager.applicationinsights.models.ItemScope; -import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; -import com.azure.resourcemanager.applicationinsights.models.ItemTypeParameter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class AnalyticsItemsImpl implements AnalyticsItems { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AnalyticsItemsImpl.class); - - private final AnalyticsItemsClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public AnalyticsItemsImpl( - AnalyticsItemsClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public List list( - String resourceGroupName, String resourceName, ItemScopePath scopePath) { - List inner = - this.serviceClient().list(resourceGroupName, resourceName, scopePath); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ApplicationInsightsComponentAnalyticsItemImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public Response> listWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ItemScope scope, - ItemTypeParameter type, - Boolean includeContent, - Context context) { - Response> inner = - this - .serviceClient() - .listWithResponse(resourceGroupName, resourceName, scopePath, scope, type, includeContent, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - inner - .getValue() - .stream() - .map(inner1 -> new ApplicationInsightsComponentAnalyticsItemImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return null; - } - } - - public ApplicationInsightsComponentAnalyticsItem get( - String resourceGroupName, String resourceName, ItemScopePath scopePath) { - ApplicationInsightsComponentAnalyticsItemInner inner = - this.serviceClient().get(resourceGroupName, resourceName, scopePath); - if (inner != null) { - return new ApplicationInsightsComponentAnalyticsItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, scopePath, id, name, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentAnalyticsItemImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ApplicationInsightsComponentAnalyticsItem put( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties) { - ApplicationInsightsComponentAnalyticsItemInner inner = - this.serviceClient().put(resourceGroupName, resourceName, scopePath, itemProperties); - if (inner != null) { - return new ApplicationInsightsComponentAnalyticsItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response putWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties, - Boolean overrideItem, - Context context) { - Response inner = - this - .serviceClient() - .putWithResponse(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentAnalyticsItemImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String resourceName, ItemScopePath scopePath) { - this.serviceClient().delete(resourceGroupName, resourceName, scopePath); - } - - public Response deleteWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, scopePath, id, name, context); - } - - private AnalyticsItemsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationImpl.java deleted file mode 100644 index f6340d77058ab..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner; -import com.azure.resourcemanager.applicationinsights.models.Annotation; -import java.time.OffsetDateTime; - -public final class AnnotationImpl implements Annotation { - private AnnotationInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - AnnotationImpl( - AnnotationInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String annotationName() { - return this.innerModel().annotationName(); - } - - public String category() { - return this.innerModel().category(); - } - - public OffsetDateTime eventTime() { - return this.innerModel().eventTime(); - } - - public String id() { - return this.innerModel().id(); - } - - public String properties() { - return this.innerModel().properties(); - } - - public String relatedAnnotation() { - return this.innerModel().relatedAnnotation(); - } - - public AnnotationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsClientImpl.java deleted file mode 100644 index 4b38ced0684ff..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsClientImpl.java +++ /dev/null @@ -1,822 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -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.applicationinsights.fluent.AnnotationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner; -import com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException; -import com.azure.resourcemanager.applicationinsights.models.AnnotationsListResult; -import java.util.List; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in AnnotationsClient. */ -public final class AnnotationsClientImpl implements AnnotationsClient { - private final ClientLogger logger = new ClientLogger(AnnotationsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final AnnotationsService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of AnnotationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AnnotationsClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(AnnotationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientAnnotations to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - private interface AnnotationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/Annotations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(AnnotationErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @QueryParam("start") String start, - @QueryParam("end") String end, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/Annotations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(AnnotationErrorException.class) - Mono>> create( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @BodyParam("application/json") AnnotationInner annotationProperties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/Annotations/{annotationId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("annotationId") String annotationId, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/Annotations/{annotationId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(AnnotationErrorException.class) - Mono>> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("annotationId") String annotationId, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets the list of annotations for a component for given time range. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param start The start time to query from for annotations, cannot be older than 90 days from current date. - * @param end The end time to query for annotations. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws AnnotationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of annotations for a component for given time range. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName, String start, String end) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (start == null) { - return Mono.error(new IllegalArgumentException("Parameter start is required and cannot be null.")); - } - if (end == null) { - return Mono.error(new IllegalArgumentException("Parameter end is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - start, - end, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of annotations for a component for given time range. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param start The start time to query from for annotations, cannot be older than 90 days from current date. - * @param end The end time to query for annotations. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws AnnotationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of annotations for a component for given time range. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName, String start, String end, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (start == null) { - return Mono.error(new IllegalArgumentException("Parameter start is required and cannot be null.")); - } - if (end == null) { - return Mono.error(new IllegalArgumentException("Parameter end is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - start, - end, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); - } - - /** - * Gets the list of annotations for a component for given time range. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param start The start time to query from for annotations, cannot be older than 90 days from current date. - * @param end The end time to query for annotations. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws AnnotationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of annotations for a component for given time range. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String resourceName, String start, String end) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, start, end)); - } - - /** - * Gets the list of annotations for a component for given time range. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param start The start time to query from for annotations, cannot be older than 90 days from current date. - * @param end The end time to query for annotations. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws AnnotationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of annotations for a component for given time range. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String resourceName, String start, String end, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, start, end, context)); - } - - /** - * Gets the list of annotations for a component for given time range. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param start The start time to query from for annotations, cannot be older than 90 days from current date. - * @param end The end time to query for annotations. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws AnnotationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of annotations for a component for given time range. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String resourceName, String start, String end) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName, start, end)); - } - - /** - * Gets the list of annotations for a component for given time range. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param start The start time to query from for annotations, cannot be older than 90 days from current date. - * @param end The end time to query for annotations. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws AnnotationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of annotations for a component for given time range. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String resourceName, String start, String end, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName, start, end, context)); - } - - /** - * Create an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationProperties Properties that need to be specified to create an annotation of a Application - * Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws AnnotationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of Annotation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (annotationProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter annotationProperties is required and cannot be null.")); - } else { - annotationProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - annotationProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationProperties Properties that need to be specified to create an annotation of a Application - * Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws AnnotationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of Annotation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (annotationProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter annotationProperties is required and cannot be null.")); - } else { - annotationProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - annotationProperties, - accept, - context); - } - - /** - * Create an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationProperties Properties that need to be specified to create an annotation of a Application - * Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws AnnotationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of Annotation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createAsync( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties) { - return createWithResponseAsync(resourceGroupName, resourceName, annotationProperties) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationProperties Properties that need to be specified to create an annotation of a Application - * Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws AnnotationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of Annotation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List create( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties) { - return createAsync(resourceGroupName, resourceName, annotationProperties).block(); - } - - /** - * Create an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationProperties Properties that need to be specified to create an annotation of a Application - * Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws AnnotationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of Annotation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response> createWithResponse( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context) { - return createWithResponseAsync(resourceGroupName, resourceName, annotationProperties, context).block(); - } - - /** - * Delete an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String annotationId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (annotationId == null) { - return Mono.error(new IllegalArgumentException("Parameter annotationId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - annotationId, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String annotationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (annotationId == null) { - return Mono.error(new IllegalArgumentException("Parameter annotationId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - annotationId, - context); - } - - /** - * Delete an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName, String annotationId) { - return deleteWithResponseAsync(resourceGroupName, resourceName, annotationId) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String annotationId) { - deleteAsync(resourceGroupName, resourceName, annotationId).block(); - } - - /** - * Delete an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, annotationId, context).block(); - } - - /** - * Get the annotation for given id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws AnnotationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the annotation for given id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getWithResponseAsync( - String resourceGroupName, String resourceName, String annotationId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (annotationId == null) { - return Mono.error(new IllegalArgumentException("Parameter annotationId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - annotationId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the annotation for given id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws AnnotationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the annotation for given id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getWithResponseAsync( - String resourceGroupName, String resourceName, String annotationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (annotationId == null) { - return Mono.error(new IllegalArgumentException("Parameter annotationId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - annotationId, - accept, - context); - } - - /** - * Get the annotation for given id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws AnnotationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the annotation for given id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAsync(String resourceGroupName, String resourceName, String annotationId) { - return getWithResponseAsync(resourceGroupName, resourceName, annotationId) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get the annotation for given id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws AnnotationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the annotation for given id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List get(String resourceGroupName, String resourceName, String annotationId) { - return getAsync(resourceGroupName, resourceName, annotationId).block(); - } - - /** - * Get the annotation for given id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws AnnotationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the annotation for given id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response> getWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, annotationId, context).block(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsImpl.java deleted file mode 100644 index 632b3a21b0908..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsImpl.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.AnnotationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner; -import com.azure.resourcemanager.applicationinsights.models.Annotation; -import com.azure.resourcemanager.applicationinsights.models.Annotations; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class AnnotationsImpl implements Annotations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AnnotationsImpl.class); - - private final AnnotationsClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public AnnotationsImpl( - AnnotationsClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String resourceName, String start, String end) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName, start, end); - return Utils.mapPage(inner, inner1 -> new AnnotationImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String resourceName, String start, String end, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, resourceName, start, end, context); - return Utils.mapPage(inner, inner1 -> new AnnotationImpl(inner1, this.manager())); - } - - public List create( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties) { - List inner = - this.serviceClient().create(resourceGroupName, resourceName, annotationProperties); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new AnnotationImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public Response> createWithResponse( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context) { - Response> inner = - this.serviceClient().createWithResponse(resourceGroupName, resourceName, annotationProperties, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - inner - .getValue() - .stream() - .map(inner1 -> new AnnotationImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String resourceName, String annotationId) { - this.serviceClient().delete(resourceGroupName, resourceName, annotationId); - } - - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, annotationId, context); - } - - public List get(String resourceGroupName, String resourceName, String annotationId) { - List inner = this.serviceClient().get(resourceGroupName, resourceName, annotationId); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new AnnotationImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public Response> getWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context) { - Response> inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, annotationId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - inner - .getValue() - .stream() - .map(inner1 -> new AnnotationImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return null; - } - } - - private AnnotationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysClientImpl.java deleted file mode 100644 index c8eee64acc846..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysClientImpl.java +++ /dev/null @@ -1,804 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -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.applicationinsights.fluent.ApiKeysClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentApiKeyInner; -import com.azure.resourcemanager.applicationinsights.models.ApiKeyRequest; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentApiKeyListResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ApiKeysClient. */ -public final class ApiKeysClientImpl implements ApiKeysClient { - private final ClientLogger logger = new ClientLogger(ApiKeysClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ApiKeysService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of ApiKeysClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ApiKeysClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = RestProxy.create(ApiKeysService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientApiKeys to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - private interface ApiKeysService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/ApiKeys") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/ApiKeys") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ApiKeyRequest apiKeyProperties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/APIKeys/{keyId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("keyId") String keyId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/APIKeys/{keyId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("keyId") String keyId, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets a list of API keys of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 API keys of an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of API keys of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of API keys of an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); - } - - /** - * Gets a list of API keys of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 API keys of an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName)); - } - - /** - * Gets a list of API keys of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of API keys of an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String resourceName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context)); - } - - /** - * Gets a list of API keys of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 API keys of an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); - } - - /** - * Gets a list of API keys of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of API keys of an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String resourceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); - } - - /** - * Create an API Key of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights - * component. - * @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 properties that define an API key of an Application Insights Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (apiKeyProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter apiKeyProperties is required and cannot be null.")); - } else { - apiKeyProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - apiKeyProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create an API Key of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights - * component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define an API key of an Application Insights Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (apiKeyProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter apiKeyProperties is required and cannot be null.")); - } else { - apiKeyProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - apiKeyProperties, - accept, - context); - } - - /** - * Create an API Key of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights - * component. - * @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 properties that define an API key of an Application Insights Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties) { - return createWithResponseAsync(resourceGroupName, resourceName, apiKeyProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create an API Key of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights - * component. - * @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 properties that define an API key of an Application Insights Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentApiKeyInner create( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties) { - return createAsync(resourceGroupName, resourceName, apiKeyProperties).block(); - } - - /** - * Create an API Key of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights - * component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define an API key of an Application Insights Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context) { - return createWithResponseAsync(resourceGroupName, resourceName, apiKeyProperties, context).block(); - } - - /** - * Delete an API Key of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. - * @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 properties that define an API key of an Application Insights Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String keyId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (keyId == null) { - return Mono.error(new IllegalArgumentException("Parameter keyId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - keyId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete an API Key of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define an API key of an Application Insights Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String keyId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (keyId == null) { - return Mono.error(new IllegalArgumentException("Parameter keyId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - keyId, - accept, - context); - } - - /** - * Delete an API Key of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. - * @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 properties that define an API key of an Application Insights Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String resourceName, String keyId) { - return deleteWithResponseAsync(resourceGroupName, resourceName, keyId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Delete an API Key of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. - * @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 properties that define an API key of an Application Insights Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentApiKeyInner delete(String resourceGroupName, String resourceName, String keyId) { - return deleteAsync(resourceGroupName, resourceName, keyId).block(); - } - - /** - * Delete an API Key of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define an API key of an Application Insights Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, keyId, context).block(); - } - - /** - * Get the API Key for this key id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. - * @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 API Key for this key id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String keyId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (keyId == null) { - return Mono.error(new IllegalArgumentException("Parameter keyId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - keyId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the API Key for this key id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the API Key for this key id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String keyId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (keyId == null) { - return Mono.error(new IllegalArgumentException("Parameter keyId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - keyId, - accept, - context); - } - - /** - * Get the API Key for this key id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. - * @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 API Key for this key id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName, String keyId) { - return getWithResponseAsync(resourceGroupName, resourceName, keyId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get the API Key for this key id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. - * @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 API Key for this key id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentApiKeyInner get(String resourceGroupName, String resourceName, String keyId) { - return getAsync(resourceGroupName, resourceName, keyId).block(); - } - - /** - * Get the API Key for this key id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the API Key for this key id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, keyId, context).block(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysImpl.java deleted file mode 100644 index 6d3cf0a506ac1..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysImpl.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.ApiKeysClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentApiKeyInner; -import com.azure.resourcemanager.applicationinsights.models.ApiKeyRequest; -import com.azure.resourcemanager.applicationinsights.models.ApiKeys; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentApiKey; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class ApiKeysImpl implements ApiKeys { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApiKeysImpl.class); - - private final ApiKeysClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public ApiKeysImpl( - ApiKeysClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String resourceName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, resourceName); - return Utils.mapPage(inner, inner1 -> new ApplicationInsightsComponentApiKeyImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String resourceName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, resourceName, context); - return Utils.mapPage(inner, inner1 -> new ApplicationInsightsComponentApiKeyImpl(inner1, this.manager())); - } - - public ApplicationInsightsComponentApiKey create( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties) { - ApplicationInsightsComponentApiKeyInner inner = - this.serviceClient().create(resourceGroupName, resourceName, apiKeyProperties); - if (inner != null) { - return new ApplicationInsightsComponentApiKeyImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createWithResponse( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context) { - Response inner = - this.serviceClient().createWithResponse(resourceGroupName, resourceName, apiKeyProperties, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentApiKeyImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ApplicationInsightsComponentApiKey delete(String resourceGroupName, String resourceName, String keyId) { - ApplicationInsightsComponentApiKeyInner inner = - this.serviceClient().delete(resourceGroupName, resourceName, keyId); - if (inner != null) { - return new ApplicationInsightsComponentApiKeyImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context) { - Response inner = - this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, keyId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentApiKeyImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ApplicationInsightsComponentApiKey get(String resourceGroupName, String resourceName, String keyId) { - ApplicationInsightsComponentApiKeyInner inner = - this.serviceClient().get(resourceGroupName, resourceName, keyId); - if (inner != null) { - return new ApplicationInsightsComponentApiKeyImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, keyId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentApiKeyImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private ApiKeysClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentAnalyticsItemImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentAnalyticsItemImpl.java deleted file mode 100644 index cffbb8132df79..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentAnalyticsItemImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAnalyticsItemInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentAnalyticsItem; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentAnalyticsItemProperties; -import com.azure.resourcemanager.applicationinsights.models.ItemScope; -import com.azure.resourcemanager.applicationinsights.models.ItemType; - -public final class ApplicationInsightsComponentAnalyticsItemImpl implements ApplicationInsightsComponentAnalyticsItem { - private ApplicationInsightsComponentAnalyticsItemInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - ApplicationInsightsComponentAnalyticsItemImpl( - ApplicationInsightsComponentAnalyticsItemInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String content() { - return this.innerModel().content(); - } - - public String version() { - return this.innerModel().version(); - } - - public ItemScope scope() { - return this.innerModel().scope(); - } - - public ItemType type() { - return this.innerModel().type(); - } - - public String timeCreated() { - return this.innerModel().timeCreated(); - } - - public String timeModified() { - return this.innerModel().timeModified(); - } - - public ApplicationInsightsComponentAnalyticsItemProperties properties() { - return this.innerModel().properties(); - } - - public ApplicationInsightsComponentAnalyticsItemInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentApiKeyImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentApiKeyImpl.java deleted file mode 100644 index 34cc80397f98a..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentApiKeyImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentApiKeyInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentApiKey; -import java.util.Collections; -import java.util.List; - -public final class ApplicationInsightsComponentApiKeyImpl implements ApplicationInsightsComponentApiKey { - private ApplicationInsightsComponentApiKeyInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - ApplicationInsightsComponentApiKeyImpl( - ApplicationInsightsComponentApiKeyInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String apiKey() { - return this.innerModel().apiKey(); - } - - public String createdDate() { - return this.innerModel().createdDate(); - } - - public String name() { - return this.innerModel().name(); - } - - public List linkedReadProperties() { - List inner = this.innerModel().linkedReadProperties(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List linkedWriteProperties() { - List inner = this.innerModel().linkedWriteProperties(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ApplicationInsightsComponentApiKeyInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentAvailableFeaturesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentAvailableFeaturesImpl.java deleted file mode 100644 index b86b405574e4a..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentAvailableFeaturesImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAvailableFeaturesInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentAvailableFeatures; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentFeature; -import java.util.Collections; -import java.util.List; - -public final class ApplicationInsightsComponentAvailableFeaturesImpl - implements ApplicationInsightsComponentAvailableFeatures { - private ApplicationInsightsComponentAvailableFeaturesInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - ApplicationInsightsComponentAvailableFeaturesImpl( - ApplicationInsightsComponentAvailableFeaturesInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List result() { - List inner = this.innerModel().result(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ApplicationInsightsComponentAvailableFeaturesInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentBillingFeaturesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentBillingFeaturesImpl.java deleted file mode 100644 index 7d1291accc623..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentBillingFeaturesImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentBillingFeatures; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap; -import java.util.Collections; -import java.util.List; - -public final class ApplicationInsightsComponentBillingFeaturesImpl - implements ApplicationInsightsComponentBillingFeatures { - private ApplicationInsightsComponentBillingFeaturesInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - ApplicationInsightsComponentBillingFeaturesImpl( - ApplicationInsightsComponentBillingFeaturesInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public ApplicationInsightsComponentDataVolumeCap dataVolumeCap() { - return this.innerModel().dataVolumeCap(); - } - - public List currentBillingFeatures() { - List inner = this.innerModel().currentBillingFeatures(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ApplicationInsightsComponentBillingFeaturesInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentExportConfigurationImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentExportConfigurationImpl.java deleted file mode 100644 index 2b36b9f4fd148..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentExportConfigurationImpl.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentExportConfigurationInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportConfiguration; - -public final class ApplicationInsightsComponentExportConfigurationImpl - implements ApplicationInsightsComponentExportConfiguration { - private ApplicationInsightsComponentExportConfigurationInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - ApplicationInsightsComponentExportConfigurationImpl( - ApplicationInsightsComponentExportConfigurationInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String exportId() { - return this.innerModel().exportId(); - } - - public String instrumentationKey() { - return this.innerModel().instrumentationKey(); - } - - public String recordTypes() { - return this.innerModel().recordTypes(); - } - - public String applicationName() { - return this.innerModel().applicationName(); - } - - public String subscriptionId() { - return this.innerModel().subscriptionId(); - } - - public String resourceGroup() { - return this.innerModel().resourceGroup(); - } - - public String destinationStorageSubscriptionId() { - return this.innerModel().destinationStorageSubscriptionId(); - } - - public String destinationStorageLocationId() { - return this.innerModel().destinationStorageLocationId(); - } - - public String destinationAccountId() { - return this.innerModel().destinationAccountId(); - } - - public String destinationType() { - return this.innerModel().destinationType(); - } - - public String isUserEnabled() { - return this.innerModel().isUserEnabled(); - } - - public String lastUserUpdate() { - return this.innerModel().lastUserUpdate(); - } - - public String notificationQueueEnabled() { - return this.innerModel().notificationQueueEnabled(); - } - - public String exportStatus() { - return this.innerModel().exportStatus(); - } - - public String lastSuccessTime() { - return this.innerModel().lastSuccessTime(); - } - - public String lastGapTime() { - return this.innerModel().lastGapTime(); - } - - public String permanentErrorReason() { - return this.innerModel().permanentErrorReason(); - } - - public String storageName() { - return this.innerModel().storageName(); - } - - public String containerName() { - return this.innerModel().containerName(); - } - - public ApplicationInsightsComponentExportConfigurationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentFavoriteImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentFavoriteImpl.java deleted file mode 100644 index 8317f75860217..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentFavoriteImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentFavorite; -import com.azure.resourcemanager.applicationinsights.models.FavoriteType; -import java.util.Collections; -import java.util.List; - -public final class ApplicationInsightsComponentFavoriteImpl implements ApplicationInsightsComponentFavorite { - private ApplicationInsightsComponentFavoriteInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - ApplicationInsightsComponentFavoriteImpl( - ApplicationInsightsComponentFavoriteInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public String config() { - return this.innerModel().config(); - } - - public String version() { - return this.innerModel().version(); - } - - public String favoriteId() { - return this.innerModel().favoriteId(); - } - - public FavoriteType favoriteType() { - return this.innerModel().favoriteType(); - } - - public String sourceType() { - return this.innerModel().sourceType(); - } - - public String timeModified() { - return this.innerModel().timeModified(); - } - - public List tags() { - List inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String category() { - return this.innerModel().category(); - } - - public Boolean isGeneratedFromTemplate() { - return this.innerModel().isGeneratedFromTemplate(); - } - - public String userId() { - return this.innerModel().userId(); - } - - public ApplicationInsightsComponentFavoriteInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentFeatureCapabilitiesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentFeatureCapabilitiesImpl.java deleted file mode 100644 index 7738c91cca6dd..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentFeatureCapabilitiesImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFeatureCapabilitiesInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentFeatureCapabilities; - -public final class ApplicationInsightsComponentFeatureCapabilitiesImpl - implements ApplicationInsightsComponentFeatureCapabilities { - private ApplicationInsightsComponentFeatureCapabilitiesInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - ApplicationInsightsComponentFeatureCapabilitiesImpl( - ApplicationInsightsComponentFeatureCapabilitiesInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Boolean supportExportData() { - return this.innerModel().supportExportData(); - } - - public String burstThrottlePolicy() { - return this.innerModel().burstThrottlePolicy(); - } - - public String metadataClass() { - return this.innerModel().metadataClass(); - } - - public Boolean liveStreamMetrics() { - return this.innerModel().liveStreamMetrics(); - } - - public Boolean applicationMap() { - return this.innerModel().applicationMap(); - } - - public Boolean workItemIntegration() { - return this.innerModel().workItemIntegration(); - } - - public Boolean powerBIIntegration() { - return this.innerModel().powerBIIntegration(); - } - - public Boolean openSchema() { - return this.innerModel().openSchema(); - } - - public Boolean proactiveDetection() { - return this.innerModel().proactiveDetection(); - } - - public Boolean analyticsIntegration() { - return this.innerModel().analyticsIntegration(); - } - - public Boolean multipleStepWebTest() { - return this.innerModel().multipleStepWebTest(); - } - - public String apiAccessLevel() { - return this.innerModel().apiAccessLevel(); - } - - public String trackingType() { - return this.innerModel().trackingType(); - } - - public Float dailyCap() { - return this.innerModel().dailyCap(); - } - - public Float dailyCapResetTime() { - return this.innerModel().dailyCapResetTime(); - } - - public Float throttleRate() { - return this.innerModel().throttleRate(); - } - - public ApplicationInsightsComponentFeatureCapabilitiesInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentImpl.java deleted file mode 100644 index 1003169755bba..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentImpl.java +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponent; -import com.azure.resourcemanager.applicationinsights.models.ApplicationType; -import com.azure.resourcemanager.applicationinsights.models.FlowType; -import com.azure.resourcemanager.applicationinsights.models.IngestionMode; -import com.azure.resourcemanager.applicationinsights.models.PrivateLinkScopedResource; -import com.azure.resourcemanager.applicationinsights.models.RequestSource; -import com.azure.resourcemanager.applicationinsights.models.TagsResource; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class ApplicationInsightsComponentImpl - implements ApplicationInsightsComponent, - ApplicationInsightsComponent.Definition, - ApplicationInsightsComponent.Update { - private ApplicationInsightsComponentInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public String kind() { - return this.innerModel().kind(); - } - - public String applicationId() { - return this.innerModel().applicationId(); - } - - public String appId() { - return this.innerModel().appId(); - } - - public ApplicationType applicationType() { - return this.innerModel().applicationType(); - } - - public FlowType flowType() { - return this.innerModel().flowType(); - } - - public RequestSource requestSource() { - return this.innerModel().requestSource(); - } - - public String instrumentationKey() { - return this.innerModel().instrumentationKey(); - } - - public OffsetDateTime creationDate() { - return this.innerModel().creationDate(); - } - - public String tenantId() { - return this.innerModel().tenantId(); - } - - public String hockeyAppId() { - return this.innerModel().hockeyAppId(); - } - - public String hockeyAppToken() { - return this.innerModel().hockeyAppToken(); - } - - public String provisioningState() { - return this.innerModel().provisioningState(); - } - - public Double samplingPercentage() { - return this.innerModel().samplingPercentage(); - } - - public String connectionString() { - return this.innerModel().connectionString(); - } - - public Integer retentionInDays() { - return this.innerModel().retentionInDays(); - } - - public Boolean disableIpMasking() { - return this.innerModel().disableIpMasking(); - } - - public Boolean immediatePurgeDataOn30Days() { - return this.innerModel().immediatePurgeDataOn30Days(); - } - - public List privateLinkScopedResources() { - List inner = this.innerModel().privateLinkScopedResources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public IngestionMode ingestionMode() { - return this.innerModel().ingestionMode(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public ApplicationInsightsComponentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String resourceName; - - private TagsResource updateComponentTags; - - public ApplicationInsightsComponentImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public ApplicationInsightsComponent create() { - this.innerObject = - serviceManager - .serviceClient() - .getComponents() - .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ApplicationInsightsComponent create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponents() - .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), context) - .getValue(); - return this; - } - - ApplicationInsightsComponentImpl( - String name, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = new ApplicationInsightsComponentInner(); - this.serviceManager = serviceManager; - this.resourceName = name; - } - - public ApplicationInsightsComponentImpl update() { - this.updateComponentTags = new TagsResource(); - return this; - } - - public ApplicationInsightsComponent apply() { - this.innerObject = - serviceManager - .serviceClient() - .getComponents() - .updateTagsWithResponse(resourceGroupName, resourceName, updateComponentTags, Context.NONE) - .getValue(); - return this; - } - - public ApplicationInsightsComponent apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponents() - .updateTagsWithResponse(resourceGroupName, resourceName, updateComponentTags, context) - .getValue(); - return this; - } - - ApplicationInsightsComponentImpl( - ApplicationInsightsComponentInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "components"); - } - - public ApplicationInsightsComponent refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getComponents() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE) - .getValue(); - return this; - } - - public ApplicationInsightsComponent refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponents() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, context) - .getValue(); - return this; - } - - public ApplicationInsightsComponentImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ApplicationInsightsComponentImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ApplicationInsightsComponentImpl withKind(String kind) { - this.innerModel().withKind(kind); - return this; - } - - public ApplicationInsightsComponentImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateComponentTags.withTags(tags); - return this; - } - } - - public ApplicationInsightsComponentImpl withApplicationType(ApplicationType applicationType) { - this.innerModel().withApplicationType(applicationType); - return this; - } - - public ApplicationInsightsComponentImpl withFlowType(FlowType flowType) { - this.innerModel().withFlowType(flowType); - return this; - } - - public ApplicationInsightsComponentImpl withRequestSource(RequestSource requestSource) { - this.innerModel().withRequestSource(requestSource); - return this; - } - - public ApplicationInsightsComponentImpl withHockeyAppId(String hockeyAppId) { - this.innerModel().withHockeyAppId(hockeyAppId); - return this; - } - - public ApplicationInsightsComponentImpl withSamplingPercentage(Double samplingPercentage) { - this.innerModel().withSamplingPercentage(samplingPercentage); - return this; - } - - public ApplicationInsightsComponentImpl withRetentionInDays(Integer retentionInDays) { - this.innerModel().withRetentionInDays(retentionInDays); - return this; - } - - public ApplicationInsightsComponentImpl withDisableIpMasking(Boolean disableIpMasking) { - this.innerModel().withDisableIpMasking(disableIpMasking); - return this; - } - - public ApplicationInsightsComponentImpl withImmediatePurgeDataOn30Days(Boolean immediatePurgeDataOn30Days) { - this.innerModel().withImmediatePurgeDataOn30Days(immediatePurgeDataOn30Days); - return this; - } - - public ApplicationInsightsComponentImpl withIngestionMode(IngestionMode ingestionMode) { - this.innerModel().withIngestionMode(ingestionMode); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentProactiveDetectionConfigurationImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentProactiveDetectionConfigurationImpl.java deleted file mode 100644 index a8ea99baa2e75..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentProactiveDetectionConfigurationImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentProactiveDetectionConfigurationInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions; -import java.util.Collections; -import java.util.List; - -public final class ApplicationInsightsComponentProactiveDetectionConfigurationImpl - implements ApplicationInsightsComponentProactiveDetectionConfiguration { - private ApplicationInsightsComponentProactiveDetectionConfigurationInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - ApplicationInsightsComponentProactiveDetectionConfigurationImpl( - ApplicationInsightsComponentProactiveDetectionConfigurationInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public Boolean enabled() { - return this.innerModel().enabled(); - } - - public Boolean sendEmailsToSubscriptionOwners() { - return this.innerModel().sendEmailsToSubscriptionOwners(); - } - - public List customEmails() { - List inner = this.innerModel().customEmails(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String lastUpdatedTime() { - return this.innerModel().lastUpdatedTime(); - } - - public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions ruleDefinitions() { - return this.innerModel().ruleDefinitions(); - } - - public ApplicationInsightsComponentProactiveDetectionConfigurationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentQuotaStatusImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentQuotaStatusImpl.java deleted file mode 100644 index 981122afd40ee..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentQuotaStatusImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentQuotaStatusInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentQuotaStatus; - -public final class ApplicationInsightsComponentQuotaStatusImpl implements ApplicationInsightsComponentQuotaStatus { - private ApplicationInsightsComponentQuotaStatusInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - ApplicationInsightsComponentQuotaStatusImpl( - ApplicationInsightsComponentQuotaStatusInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String appId() { - return this.innerModel().appId(); - } - - public Boolean shouldBeThrottled() { - return this.innerModel().shouldBeThrottled(); - } - - public String expirationTime() { - return this.innerModel().expirationTime(); - } - - public ApplicationInsightsComponentQuotaStatusInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentWebTestLocationImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentWebTestLocationImpl.java deleted file mode 100644 index d93373b979fe6..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentWebTestLocationImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentWebTestLocationInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentWebTestLocation; - -public final class ApplicationInsightsComponentWebTestLocationImpl - implements ApplicationInsightsComponentWebTestLocation { - private ApplicationInsightsComponentWebTestLocationInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - ApplicationInsightsComponentWebTestLocationImpl( - ApplicationInsightsComponentWebTestLocationInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String displayName() { - return this.innerModel().displayName(); - } - - public String tag() { - return this.innerModel().tag(); - } - - public ApplicationInsightsComponentWebTestLocationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientImpl.java index 1f8a927f1fd14..b2fca001919d5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientImpl.java @@ -21,24 +21,8 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.applicationinsights.fluent.AnalyticsItemsClient; -import com.azure.resourcemanager.applicationinsights.fluent.AnnotationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.ApiKeysClient; import com.azure.resourcemanager.applicationinsights.fluent.ApplicationInsightsManagementClient; -import com.azure.resourcemanager.applicationinsights.fluent.ComponentAvailableFeaturesClient; -import com.azure.resourcemanager.applicationinsights.fluent.ComponentCurrentBillingFeaturesClient; -import com.azure.resourcemanager.applicationinsights.fluent.ComponentFeatureCapabilitiesClient; -import com.azure.resourcemanager.applicationinsights.fluent.ComponentQuotaStatusClient; -import com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient; -import com.azure.resourcemanager.applicationinsights.fluent.ExportConfigurationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient; -import com.azure.resourcemanager.applicationinsights.fluent.MyWorkbooksClient; -import com.azure.resourcemanager.applicationinsights.fluent.OperationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.ProactiveDetectionConfigurationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.WebTestLocationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.WebTestsClient; -import com.azure.resourcemanager.applicationinsights.fluent.WorkItemConfigurationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient; +import com.azure.resourcemanager.applicationinsights.fluent.WorkbookTemplatesClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -78,6 +62,18 @@ public String getEndpoint() { return this.endpoint; } + /** Api Version. */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + /** The HTTP pipeline to send requests through. */ private final HttpPipeline httpPipeline; @@ -114,208 +110,16 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The AnalyticsItemsClient object to access its operations. */ - private final AnalyticsItemsClient analyticsItems; - - /** - * Gets the AnalyticsItemsClient object to access its operations. - * - * @return the AnalyticsItemsClient object. - */ - public AnalyticsItemsClient getAnalyticsItems() { - return this.analyticsItems; - } - - /** The AnnotationsClient object to access its operations. */ - private final AnnotationsClient annotations; - - /** - * Gets the AnnotationsClient object to access its operations. - * - * @return the AnnotationsClient object. - */ - public AnnotationsClient getAnnotations() { - return this.annotations; - } - - /** The ApiKeysClient object to access its operations. */ - private final ApiKeysClient apiKeys; - - /** - * Gets the ApiKeysClient object to access its operations. - * - * @return the ApiKeysClient object. - */ - public ApiKeysClient getApiKeys() { - return this.apiKeys; - } - - /** The ExportConfigurationsClient object to access its operations. */ - private final ExportConfigurationsClient exportConfigurations; - - /** - * Gets the ExportConfigurationsClient object to access its operations. - * - * @return the ExportConfigurationsClient object. - */ - public ExportConfigurationsClient getExportConfigurations() { - return this.exportConfigurations; - } - - /** The ComponentCurrentBillingFeaturesClient object to access its operations. */ - private final ComponentCurrentBillingFeaturesClient componentCurrentBillingFeatures; - - /** - * Gets the ComponentCurrentBillingFeaturesClient object to access its operations. - * - * @return the ComponentCurrentBillingFeaturesClient object. - */ - public ComponentCurrentBillingFeaturesClient getComponentCurrentBillingFeatures() { - return this.componentCurrentBillingFeatures; - } - - /** The ComponentQuotaStatusClient object to access its operations. */ - private final ComponentQuotaStatusClient componentQuotaStatus; - - /** - * Gets the ComponentQuotaStatusClient object to access its operations. - * - * @return the ComponentQuotaStatusClient object. - */ - public ComponentQuotaStatusClient getComponentQuotaStatus() { - return this.componentQuotaStatus; - } - - /** The ComponentFeatureCapabilitiesClient object to access its operations. */ - private final ComponentFeatureCapabilitiesClient componentFeatureCapabilities; - - /** - * Gets the ComponentFeatureCapabilitiesClient object to access its operations. - * - * @return the ComponentFeatureCapabilitiesClient object. - */ - public ComponentFeatureCapabilitiesClient getComponentFeatureCapabilities() { - return this.componentFeatureCapabilities; - } - - /** The ComponentAvailableFeaturesClient object to access its operations. */ - private final ComponentAvailableFeaturesClient componentAvailableFeatures; - - /** - * Gets the ComponentAvailableFeaturesClient object to access its operations. - * - * @return the ComponentAvailableFeaturesClient object. - */ - public ComponentAvailableFeaturesClient getComponentAvailableFeatures() { - return this.componentAvailableFeatures; - } - - /** The ProactiveDetectionConfigurationsClient object to access its operations. */ - private final ProactiveDetectionConfigurationsClient proactiveDetectionConfigurations; - - /** - * Gets the ProactiveDetectionConfigurationsClient object to access its operations. - * - * @return the ProactiveDetectionConfigurationsClient object. - */ - public ProactiveDetectionConfigurationsClient getProactiveDetectionConfigurations() { - return this.proactiveDetectionConfigurations; - } - - /** The ComponentsClient object to access its operations. */ - private final ComponentsClient components; - - /** - * Gets the ComponentsClient object to access its operations. - * - * @return the ComponentsClient object. - */ - public ComponentsClient getComponents() { - return this.components; - } - - /** The WorkItemConfigurationsClient object to access its operations. */ - private final WorkItemConfigurationsClient workItemConfigurations; - - /** - * Gets the WorkItemConfigurationsClient object to access its operations. - * - * @return the WorkItemConfigurationsClient object. - */ - public WorkItemConfigurationsClient getWorkItemConfigurations() { - return this.workItemConfigurations; - } - - /** The FavoritesClient object to access its operations. */ - private final FavoritesClient favorites; - - /** - * Gets the FavoritesClient object to access its operations. - * - * @return the FavoritesClient object. - */ - public FavoritesClient getFavorites() { - return this.favorites; - } - - /** The WebTestLocationsClient object to access its operations. */ - private final WebTestLocationsClient webTestLocations; - - /** - * Gets the WebTestLocationsClient object to access its operations. - * - * @return the WebTestLocationsClient object. - */ - public WebTestLocationsClient getWebTestLocations() { - return this.webTestLocations; - } - - /** The WebTestsClient object to access its operations. */ - private final WebTestsClient webTests; - - /** - * Gets the WebTestsClient object to access its operations. - * - * @return the WebTestsClient object. - */ - public WebTestsClient getWebTests() { - return this.webTests; - } - - /** The MyWorkbooksClient object to access its operations. */ - private final MyWorkbooksClient myWorkbooks; - - /** - * Gets the MyWorkbooksClient object to access its operations. - * - * @return the MyWorkbooksClient object. - */ - public MyWorkbooksClient getMyWorkbooks() { - return this.myWorkbooks; - } - - /** The WorkbooksClient object to access its operations. */ - private final WorkbooksClient workbooks; - - /** - * Gets the WorkbooksClient object to access its operations. - * - * @return the WorkbooksClient object. - */ - public WorkbooksClient getWorkbooks() { - return this.workbooks; - } - - /** The OperationsClient object to access its operations. */ - private final OperationsClient operations; + /** The WorkbookTemplatesClient object to access its operations. */ + private final WorkbookTemplatesClient workbookTemplates; /** - * Gets the OperationsClient object to access its operations. + * Gets the WorkbookTemplatesClient object to access its operations. * - * @return the OperationsClient object. + * @return the WorkbookTemplatesClient object. */ - public OperationsClient getOperations() { - return this.operations; + public WorkbookTemplatesClient getWorkbookTemplates() { + return this.workbookTemplates; } /** @@ -340,23 +144,8 @@ public OperationsClient getOperations() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.analyticsItems = new AnalyticsItemsClientImpl(this); - this.annotations = new AnnotationsClientImpl(this); - this.apiKeys = new ApiKeysClientImpl(this); - this.exportConfigurations = new ExportConfigurationsClientImpl(this); - this.componentCurrentBillingFeatures = new ComponentCurrentBillingFeaturesClientImpl(this); - this.componentQuotaStatus = new ComponentQuotaStatusClientImpl(this); - this.componentFeatureCapabilities = new ComponentFeatureCapabilitiesClientImpl(this); - this.componentAvailableFeatures = new ComponentAvailableFeaturesClientImpl(this); - this.proactiveDetectionConfigurations = new ProactiveDetectionConfigurationsClientImpl(this); - this.components = new ComponentsClientImpl(this); - this.workItemConfigurations = new WorkItemConfigurationsClientImpl(this); - this.favorites = new FavoritesClientImpl(this); - this.webTestLocations = new WebTestLocationsClientImpl(this); - this.webTests = new WebTestsClientImpl(this); - this.myWorkbooks = new MyWorkbooksClientImpl(this); - this.workbooks = new WorkbooksClientImpl(this); - this.operations = new OperationsClientImpl(this); + this.apiVersion = "2020-11-20"; + this.workbookTemplates = new WorkbookTemplatesClientImpl(this); } /** diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesClientImpl.java deleted file mode 100644 index f56cc4a98e632..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesClientImpl.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -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.applicationinsights.fluent.ComponentAvailableFeaturesClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAvailableFeaturesInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ComponentAvailableFeaturesClient. */ -public final class ComponentAvailableFeaturesClientImpl implements ComponentAvailableFeaturesClient { - private final ClientLogger logger = new ClientLogger(ComponentAvailableFeaturesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ComponentAvailableFeaturesService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of ComponentAvailableFeaturesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ComponentAvailableFeaturesClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy - .create( - ComponentAvailableFeaturesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientComponentAvailableFeatures to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - private interface ComponentAvailableFeaturesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/getavailablebillingfeatures") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Returns all available features of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component available features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns all available features of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component available features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context); - } - - /** - * Returns all available features of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component available features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName) { - return getWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Returns all available features of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component available features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentAvailableFeaturesInner get(String resourceGroupName, String resourceName) { - return getAsync(resourceGroupName, resourceName).block(); - } - - /** - * Returns all available features of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component available features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, context).block(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesImpl.java deleted file mode 100644 index 38c40d5dc3202..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.ComponentAvailableFeaturesClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAvailableFeaturesInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentAvailableFeatures; -import com.azure.resourcemanager.applicationinsights.models.ComponentAvailableFeatures; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class ComponentAvailableFeaturesImpl implements ComponentAvailableFeatures { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ComponentAvailableFeaturesImpl.class); - - private final ComponentAvailableFeaturesClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public ComponentAvailableFeaturesImpl( - ComponentAvailableFeaturesClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public ApplicationInsightsComponentAvailableFeatures get(String resourceGroupName, String resourceName) { - ApplicationInsightsComponentAvailableFeaturesInner inner = - this.serviceClient().get(resourceGroupName, resourceName); - if (inner != null) { - return new ApplicationInsightsComponentAvailableFeaturesImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentAvailableFeaturesImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private ComponentAvailableFeaturesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesClientImpl.java deleted file mode 100644 index 0b5f6756af4b3..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesClientImpl.java +++ /dev/null @@ -1,439 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -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.applicationinsights.fluent.ComponentCurrentBillingFeaturesClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ComponentCurrentBillingFeaturesClient. */ -public final class ComponentCurrentBillingFeaturesClientImpl implements ComponentCurrentBillingFeaturesClient { - private final ClientLogger logger = new ClientLogger(ComponentCurrentBillingFeaturesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ComponentCurrentBillingFeaturesService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of ComponentCurrentBillingFeaturesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ComponentCurrentBillingFeaturesClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy - .create( - ComponentCurrentBillingFeaturesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientComponentCurrentBillingFeatures to - * be used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - private interface ComponentCurrentBillingFeaturesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/currentbillingfeatures") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/currentbillingfeatures") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Returns current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component billing features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component billing features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context); - } - - /** - * Returns current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component billing features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName) { - return getWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Returns current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component billing features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentBillingFeaturesInner get(String resourceGroupName, String resourceName) { - return getAsync(resourceGroupName, resourceName).block(); - } - - /** - * Returns current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component billing features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Update current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param billingFeaturesProperties Properties that need to be specified to update billing features for an - * Application Insights component. - * @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 an Application Insights component billing features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (billingFeaturesProperties == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter billingFeaturesProperties is required and cannot be null.")); - } else { - billingFeaturesProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - billingFeaturesProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param billingFeaturesProperties Properties that need to be specified to update billing features for an - * Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component billing features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (billingFeaturesProperties == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter billingFeaturesProperties is required and cannot be null.")); - } else { - billingFeaturesProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - billingFeaturesProperties, - accept, - context); - } - - /** - * Update current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param billingFeaturesProperties Properties that need to be specified to update billing features for an - * Application Insights component. - * @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 an Application Insights component billing features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties) { - return updateWithResponseAsync(resourceGroupName, resourceName, billingFeaturesProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param billingFeaturesProperties Properties that need to be specified to update billing features for an - * Application Insights component. - * @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 an Application Insights component billing features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentBillingFeaturesInner update( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties) { - return updateAsync(resourceGroupName, resourceName, billingFeaturesProperties).block(); - } - - /** - * Update current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param billingFeaturesProperties Properties that need to be specified to update billing features for an - * Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component billing features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, - Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, billingFeaturesProperties, context).block(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesImpl.java deleted file mode 100644 index 3c5926b580042..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesImpl.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.ComponentCurrentBillingFeaturesClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentBillingFeatures; -import com.azure.resourcemanager.applicationinsights.models.ComponentCurrentBillingFeatures; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class ComponentCurrentBillingFeaturesImpl implements ComponentCurrentBillingFeatures { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ComponentCurrentBillingFeaturesImpl.class); - - private final ComponentCurrentBillingFeaturesClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public ComponentCurrentBillingFeaturesImpl( - ComponentCurrentBillingFeaturesClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public ApplicationInsightsComponentBillingFeatures get(String resourceGroupName, String resourceName) { - ApplicationInsightsComponentBillingFeaturesInner inner = - this.serviceClient().get(resourceGroupName, resourceName); - if (inner != null) { - return new ApplicationInsightsComponentBillingFeaturesImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentBillingFeaturesImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ApplicationInsightsComponentBillingFeatures update( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties) { - ApplicationInsightsComponentBillingFeaturesInner inner = - this.serviceClient().update(resourceGroupName, resourceName, billingFeaturesProperties); - if (inner != null) { - return new ApplicationInsightsComponentBillingFeaturesImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, - Context context) { - Response inner = - this - .serviceClient() - .updateWithResponse(resourceGroupName, resourceName, billingFeaturesProperties, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentBillingFeaturesImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private ComponentCurrentBillingFeaturesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesClientImpl.java deleted file mode 100644 index ded904d6039b8..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesClientImpl.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -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.applicationinsights.fluent.ComponentFeatureCapabilitiesClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFeatureCapabilitiesInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ComponentFeatureCapabilitiesClient. */ -public final class ComponentFeatureCapabilitiesClientImpl implements ComponentFeatureCapabilitiesClient { - private final ClientLogger logger = new ClientLogger(ComponentFeatureCapabilitiesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ComponentFeatureCapabilitiesService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of ComponentFeatureCapabilitiesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ComponentFeatureCapabilitiesClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy - .create( - ComponentFeatureCapabilitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientComponentFeatureCapabilities to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - private interface ComponentFeatureCapabilitiesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/featurecapabilities") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Returns feature capabilities of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component feature capabilities. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns feature capabilities of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component feature capabilities. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context); - } - - /** - * Returns feature capabilities of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component feature capabilities. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName) { - return getWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Returns feature capabilities of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component feature capabilities. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentFeatureCapabilitiesInner get(String resourceGroupName, String resourceName) { - return getAsync(resourceGroupName, resourceName).block(); - } - - /** - * Returns feature capabilities of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component feature capabilities. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, context).block(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesImpl.java deleted file mode 100644 index 23a1118e0238d..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.ComponentFeatureCapabilitiesClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFeatureCapabilitiesInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentFeatureCapabilities; -import com.azure.resourcemanager.applicationinsights.models.ComponentFeatureCapabilities; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class ComponentFeatureCapabilitiesImpl implements ComponentFeatureCapabilities { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ComponentFeatureCapabilitiesImpl.class); - - private final ComponentFeatureCapabilitiesClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public ComponentFeatureCapabilitiesImpl( - ComponentFeatureCapabilitiesClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public ApplicationInsightsComponentFeatureCapabilities get(String resourceGroupName, String resourceName) { - ApplicationInsightsComponentFeatureCapabilitiesInner inner = - this.serviceClient().get(resourceGroupName, resourceName); - if (inner != null) { - return new ApplicationInsightsComponentFeatureCapabilitiesImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentFeatureCapabilitiesImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private ComponentFeatureCapabilitiesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeResponseImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeResponseImpl.java deleted file mode 100644 index ddcaf5433d5de..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeResponseImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeResponseInner; -import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeResponse; - -public final class ComponentPurgeResponseImpl implements ComponentPurgeResponse { - private ComponentPurgeResponseInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - ComponentPurgeResponseImpl( - ComponentPurgeResponseInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String operationId() { - return this.innerModel().operationId(); - } - - public ComponentPurgeResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeStatusResponseImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeStatusResponseImpl.java deleted file mode 100644 index b1c493b0247cf..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentPurgeStatusResponseImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeStatusResponseInner; -import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeStatusResponse; -import com.azure.resourcemanager.applicationinsights.models.PurgeState; - -public final class ComponentPurgeStatusResponseImpl implements ComponentPurgeStatusResponse { - private ComponentPurgeStatusResponseInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - ComponentPurgeStatusResponseImpl( - ComponentPurgeStatusResponseInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public PurgeState status() { - return this.innerModel().status(); - } - - public ComponentPurgeStatusResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusClientImpl.java deleted file mode 100644 index e387bbdd27f4f..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusClientImpl.java +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -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.applicationinsights.fluent.ComponentQuotaStatusClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentQuotaStatusInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ComponentQuotaStatusClient. */ -public final class ComponentQuotaStatusClientImpl implements ComponentQuotaStatusClient { - private final ClientLogger logger = new ClientLogger(ComponentQuotaStatusClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ComponentQuotaStatusService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of ComponentQuotaStatusClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ComponentQuotaStatusClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy - .create(ComponentQuotaStatusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientComponentQuotaStatus to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - private interface ComponentQuotaStatusService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/quotastatus") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Returns daily data volume cap (quota) status for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component daily data volume cap status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns daily data volume cap (quota) status for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component daily data volume cap status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context); - } - - /** - * Returns daily data volume cap (quota) status for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component daily data volume cap status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String resourceName) { - return getWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Returns daily data volume cap (quota) status for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component daily data volume cap status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentQuotaStatusInner get(String resourceGroupName, String resourceName) { - return getAsync(resourceGroupName, resourceName).block(); - } - - /** - * Returns daily data volume cap (quota) status for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component daily data volume cap status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, context).block(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusImpl.java deleted file mode 100644 index 4a943c62e1406..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.ComponentQuotaStatusClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentQuotaStatusInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentQuotaStatus; -import com.azure.resourcemanager.applicationinsights.models.ComponentQuotaStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class ComponentQuotaStatusImpl implements ComponentQuotaStatus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ComponentQuotaStatusImpl.class); - - private final ComponentQuotaStatusClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public ComponentQuotaStatusImpl( - ComponentQuotaStatusClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public ApplicationInsightsComponentQuotaStatus get(String resourceGroupName, String resourceName) { - ApplicationInsightsComponentQuotaStatusInner inner = this.serviceClient().get(resourceGroupName, resourceName); - if (inner != null) { - return new ApplicationInsightsComponentQuotaStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentQuotaStatusImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private ComponentQuotaStatusClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsClientImpl.java deleted file mode 100644 index baea1133817b1..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsClientImpl.java +++ /dev/null @@ -1,1656 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -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.applicationinsights.fluent.ComponentsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentInner; -import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeResponseInner; -import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeStatusResponseInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentListResult; -import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeBody; -import com.azure.resourcemanager.applicationinsights.models.TagsResource; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ComponentsClient. */ -public final class ComponentsClientImpl implements ComponentsClient { - private final ClientLogger logger = new ClientLogger(ComponentsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ComponentsService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of ComponentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ComponentsClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(ComponentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientComponents to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - private interface ComponentsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/components") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights" - + "/components") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ApplicationInsightsComponentInner insightProperties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateTags( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @BodyParam("application/json") TagsResource componentTags, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/purge") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> purge( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ComponentPurgeBody body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/operations/{purgeId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getPurgeStatus( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("purgeId") String purgeId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets a list of all Application Insights components within a subscription. - * - * @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 all Application Insights components within a subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of all Application Insights components within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Application Insights components within a subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets a list of all Application Insights components within a subscription. - * - * @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 all Application Insights components within a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of all Application Insights components within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Application Insights components within a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of all Application Insights components within a subscription. - * - * @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 all Application Insights components within a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Gets a list of all Application Insights components within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Application Insights components within a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Gets a list of Application Insights components within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Application Insights components within a resource group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of Application Insights components within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Application Insights components within a resource group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets a list of Application Insights components within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Application Insights components within a resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of Application Insights components within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Application Insights components within a resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of Application Insights components within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Application Insights components within a resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Gets a list of Application Insights components within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Application Insights components within a resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup( - String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Deletes an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - context); - } - - /** - * Deletes an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName) { - return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName) { - deleteAsync(resourceGroupName, resourceName).block(); - } - - /** - * Deletes an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Returns an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context); - } - - /** - * Returns an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync( - String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Returns an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupAsync(resourceGroupName, resourceName).block(); - } - - /** - * Returns an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Creates (or updates) an Application Insights component. Note: You cannot specify a different value for - * InstrumentationKey nor AppId in the Put operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param insightProperties Properties that need to be specified to create an Application Insights component. - * @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 an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String resourceName, ApplicationInsightsComponentInner insightProperties) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (insightProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter insightProperties is required and cannot be null.")); - } else { - insightProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - insightProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates (or updates) an Application Insights component. Note: You cannot specify a different value for - * InstrumentationKey nor AppId in the Put operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param insightProperties Properties that need to be specified to create an Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentInner insightProperties, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (insightProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter insightProperties is required and cannot be null.")); - } else { - insightProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - insightProperties, - accept, - context); - } - - /** - * Creates (or updates) an Application Insights component. Note: You cannot specify a different value for - * InstrumentationKey nor AppId in the Put operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param insightProperties Properties that need to be specified to create an Application Insights component. - * @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 an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, ApplicationInsightsComponentInner insightProperties) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, insightProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates (or updates) an Application Insights component. Note: You cannot specify a different value for - * InstrumentationKey nor AppId in the Put operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param insightProperties Properties that need to be specified to create an Application Insights component. - * @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 an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentInner createOrUpdate( - String resourceGroupName, String resourceName, ApplicationInsightsComponentInner insightProperties) { - return createOrUpdateAsync(resourceGroupName, resourceName, insightProperties).block(); - } - - /** - * Creates (or updates) an Application Insights component. Note: You cannot specify a different value for - * InstrumentationKey nor AppId in the Put operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param insightProperties Properties that need to be specified to create an Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentInner insightProperties, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, insightProperties, context).block(); - } - - /** - * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param componentTags Updated tag information to set into the component instance. - * @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 an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateTagsWithResponseAsync( - String resourceGroupName, String resourceName, TagsResource componentTags) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (componentTags == null) { - return Mono.error(new IllegalArgumentException("Parameter componentTags is required and cannot be null.")); - } else { - componentTags.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .updateTags( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - componentTags, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param componentTags Updated tag information to set into the component instance. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateTagsWithResponseAsync( - String resourceGroupName, String resourceName, TagsResource componentTags, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (componentTags == null) { - return Mono.error(new IllegalArgumentException("Parameter componentTags is required and cannot be null.")); - } else { - componentTags.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .updateTags( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - componentTags, - accept, - context); - } - - /** - * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param componentTags Updated tag information to set into the component instance. - * @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 an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync( - String resourceGroupName, String resourceName, TagsResource componentTags) { - return updateTagsWithResponseAsync(resourceGroupName, resourceName, componentTags) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param componentTags Updated tag information to set into the component instance. - * @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 an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentInner updateTags( - String resourceGroupName, String resourceName, TagsResource componentTags) { - return updateTagsAsync(resourceGroupName, resourceName, componentTags).block(); - } - - /** - * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param componentTags Updated tag information to set into the component instance. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateTagsWithResponse( - String resourceGroupName, String resourceName, TagsResource componentTags, Context context) { - return updateTagsWithResponseAsync(resourceGroupName, resourceName, componentTags, context).block(); - } - - /** - * Purges data in an Application Insights component by a set of user-defined filters. - * - *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch - * the execution of purge requests by sending a single command whose predicate includes all user identities that - * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param body Describes the body of a request to purge data in a single table of an Application Insights component. - * @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 response containing operationId for a specific purge action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> purgeWithResponseAsync( - String resourceGroupName, String resourceName, ComponentPurgeBody body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .purge( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Purges data in an Application Insights component by a set of user-defined filters. - * - *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch - * the execution of purge requests by sending a single command whose predicate includes all user identities that - * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param body Describes the body of a request to purge data in a single table of an Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response containing operationId for a specific purge action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> purgeWithResponseAsync( - String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .purge( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - body, - accept, - context); - } - - /** - * Purges data in an Application Insights component by a set of user-defined filters. - * - *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch - * the execution of purge requests by sending a single command whose predicate includes all user identities that - * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param body Describes the body of a request to purge data in a single table of an Application Insights component. - * @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 response containing operationId for a specific purge action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono purgeAsync( - String resourceGroupName, String resourceName, ComponentPurgeBody body) { - return purgeWithResponseAsync(resourceGroupName, resourceName, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Purges data in an Application Insights component by a set of user-defined filters. - * - *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch - * the execution of purge requests by sending a single command whose predicate includes all user identities that - * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param body Describes the body of a request to purge data in a single table of an Application Insights component. - * @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 response containing operationId for a specific purge action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentPurgeResponseInner purge(String resourceGroupName, String resourceName, ComponentPurgeBody body) { - return purgeAsync(resourceGroupName, resourceName, body).block(); - } - - /** - * Purges data in an Application Insights component by a set of user-defined filters. - * - *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch - * the execution of purge requests by sending a single command whose predicate includes all user identities that - * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param body Describes the body of a request to purge data in a single table of an Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response containing operationId for a specific purge action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response purgeWithResponse( - String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context) { - return purgeWithResponseAsync(resourceGroupName, resourceName, body, context).block(); - } - - /** - * Get status for an ongoing purge operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. - * @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 status for an ongoing purge operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getPurgeStatusWithResponseAsync( - String resourceGroupName, String resourceName, String purgeId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (purgeId == null) { - return Mono.error(new IllegalArgumentException("Parameter purgeId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getPurgeStatus( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - purgeId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get status for an ongoing purge operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return status for an ongoing purge operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getPurgeStatusWithResponseAsync( - String resourceGroupName, String resourceName, String purgeId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (purgeId == null) { - return Mono.error(new IllegalArgumentException("Parameter purgeId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getPurgeStatus( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - purgeId, - accept, - context); - } - - /** - * Get status for an ongoing purge operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. - * @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 status for an ongoing purge operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getPurgeStatusAsync( - String resourceGroupName, String resourceName, String purgeId) { - return getPurgeStatusWithResponseAsync(resourceGroupName, resourceName, purgeId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get status for an ongoing purge operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. - * @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 status for an ongoing purge operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentPurgeStatusResponseInner getPurgeStatus( - String resourceGroupName, String resourceName, String purgeId) { - return getPurgeStatusAsync(resourceGroupName, resourceName, purgeId).block(); - } - - /** - * Get status for an ongoing purge operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return status for an ongoing purge operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPurgeStatusWithResponse( - String resourceGroupName, String resourceName, String purgeId, Context context) { - return getPurgeStatusWithResponseAsync(resourceGroupName, resourceName, purgeId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @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 describes the list of Application Insights Resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the list of Application Insights Resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @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 describes the list of Application Insights Resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the list of Application Insights Resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsImpl.java deleted file mode 100644 index ba13c5ac32633..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsImpl.java +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.ComponentsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentInner; -import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeResponseInner; -import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeStatusResponseInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponent; -import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeBody; -import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeResponse; -import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeStatusResponse; -import com.azure.resourcemanager.applicationinsights.models.Components; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class ComponentsImpl implements Components { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ComponentsImpl.class); - - private final ComponentsClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public ComponentsImpl( - ComponentsClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); - } - - public void deleteByResourceGroup(String resourceGroupName, String resourceName) { - this.serviceClient().delete(resourceGroupName, resourceName); - } - - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); - } - - public ApplicationInsightsComponent getByResourceGroup(String resourceGroupName, String resourceName) { - ApplicationInsightsComponentInner inner = - this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); - if (inner != null) { - return new ApplicationInsightsComponentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ComponentPurgeResponse purge(String resourceGroupName, String resourceName, ComponentPurgeBody body) { - ComponentPurgeResponseInner inner = this.serviceClient().purge(resourceGroupName, resourceName, body); - if (inner != null) { - return new ComponentPurgeResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response purgeWithResponse( - String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context) { - Response inner = - this.serviceClient().purgeWithResponse(resourceGroupName, resourceName, body, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ComponentPurgeResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ComponentPurgeStatusResponse getPurgeStatus(String resourceGroupName, String resourceName, String purgeId) { - ComponentPurgeStatusResponseInner inner = - this.serviceClient().getPurgeStatus(resourceGroupName, resourceName, purgeId); - if (inner != null) { - return new ComponentPurgeStatusResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getPurgeStatusWithResponse( - String resourceGroupName, String resourceName, String purgeId, Context context) { - Response inner = - this.serviceClient().getPurgeStatusWithResponse(resourceGroupName, resourceName, purgeId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ComponentPurgeStatusResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ApplicationInsightsComponent getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "components"); - if (resourceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "components"); - if (resourceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "components"); - if (resourceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - this.deleteWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "components"); - if (resourceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - return this.deleteWithResponse(resourceGroupName, resourceName, context); - } - - private ComponentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } - - public ApplicationInsightsComponentImpl define(String name) { - return new ApplicationInsightsComponentImpl(name, this.manager()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsImpl.java deleted file mode 100644 index ecc6bdcfffc48..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsImpl.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.ExportConfigurationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentExportConfigurationInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportConfiguration; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportRequest; -import com.azure.resourcemanager.applicationinsights.models.ExportConfigurations; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class ExportConfigurationsImpl implements ExportConfigurations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExportConfigurationsImpl.class); - - private final ExportConfigurationsClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public ExportConfigurationsImpl( - ExportConfigurationsClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public List list(String resourceGroupName, String resourceName) { - List inner = - this.serviceClient().list(resourceGroupName, resourceName); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ApplicationInsightsComponentExportConfigurationImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public Response> listWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response> inner = - this.serviceClient().listWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - inner - .getValue() - .stream() - .map(inner1 -> new ApplicationInsightsComponentExportConfigurationImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return null; - } - } - - public List create( - String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties) { - List inner = - this.serviceClient().create(resourceGroupName, resourceName, exportProperties); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ApplicationInsightsComponentExportConfigurationImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public Response> createWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentExportRequest exportProperties, - Context context) { - Response> inner = - this.serviceClient().createWithResponse(resourceGroupName, resourceName, exportProperties, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - inner - .getValue() - .stream() - .map(inner1 -> new ApplicationInsightsComponentExportConfigurationImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return null; - } - } - - public ApplicationInsightsComponentExportConfiguration delete( - String resourceGroupName, String resourceName, String exportId) { - ApplicationInsightsComponentExportConfigurationInner inner = - this.serviceClient().delete(resourceGroupName, resourceName, exportId); - if (inner != null) { - return new ApplicationInsightsComponentExportConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context) { - Response inner = - this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, exportId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentExportConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ApplicationInsightsComponentExportConfiguration get( - String resourceGroupName, String resourceName, String exportId) { - ApplicationInsightsComponentExportConfigurationInner inner = - this.serviceClient().get(resourceGroupName, resourceName, exportId); - if (inner != null) { - return new ApplicationInsightsComponentExportConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, exportId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentExportConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ApplicationInsightsComponentExportConfiguration update( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties) { - ApplicationInsightsComponentExportConfigurationInner inner = - this.serviceClient().update(resourceGroupName, resourceName, exportId, exportProperties); - if (inner != null) { - return new ApplicationInsightsComponentExportConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties, - Context context) { - Response inner = - this - .serviceClient() - .updateWithResponse(resourceGroupName, resourceName, exportId, exportProperties, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentExportConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private ExportConfigurationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesClientImpl.java deleted file mode 100644 index 8de1f75a97188..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesClientImpl.java +++ /dev/null @@ -1,1122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -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.core.util.serializer.CollectionFormat; -import com.azure.core.util.serializer.JacksonAdapter; -import com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; -import com.azure.resourcemanager.applicationinsights.models.FavoriteSourceType; -import com.azure.resourcemanager.applicationinsights.models.FavoriteType; -import java.util.List; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in FavoritesClient. */ -public final class FavoritesClientImpl implements FavoritesClient { - private final ClientLogger logger = new ClientLogger(FavoritesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final FavoritesService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of FavoritesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - FavoritesClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(FavoritesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientFavorites to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - private interface FavoritesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/favorites") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> list( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @QueryParam("favoriteType") FavoriteType favoriteType, - @QueryParam("sourceType") FavoriteSourceType sourceType, - @QueryParam("canFetchContent") Boolean canFetchContent, - @QueryParam("tags") String tags, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/favorites/{favoriteId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("favoriteId") String favoriteId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/favorites/{favoriteId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> add( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("favoriteId") String favoriteId, - @BodyParam("application/json") ApplicationInsightsComponentFavoriteInner favoriteProperties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/favorites/{favoriteId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("favoriteId") String favoriteId, - @BodyParam("application/json") ApplicationInsightsComponentFavoriteInner favoriteProperties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/favorites/{favoriteId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("favoriteId") String favoriteId, - Context context); - } - - /** - * Gets a list of favorites defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteType The type of favorite. Value can be either shared or user. - * @param sourceType Source type of favorite to return. When left out, the source type defaults to 'other' (not - * present in this enum). - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable favorite. If - * false, only return summary content for favorites. - * @param tags Tags that must be present on each favorite returned. - * @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 favorites defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listWithResponseAsync( - String resourceGroupName, - String resourceName, - FavoriteType favoriteType, - FavoriteSourceType sourceType, - Boolean canFetchContent, - List tags) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - favoriteType, - sourceType, - canFetchContent, - tagsConverted, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of favorites defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteType The type of favorite. Value can be either shared or user. - * @param sourceType Source type of favorite to return. When left out, the source type defaults to 'other' (not - * present in this enum). - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable favorite. If - * false, only return summary content for favorites. - * @param tags Tags that must be present on each favorite returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of favorites defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listWithResponseAsync( - String resourceGroupName, - String resourceName, - FavoriteType favoriteType, - FavoriteSourceType sourceType, - Boolean canFetchContent, - List tags, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - favoriteType, - sourceType, - canFetchContent, - tagsConverted, - accept, - context); - } - - /** - * Gets a list of favorites defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteType The type of favorite. Value can be either shared or user. - * @param sourceType Source type of favorite to return. When left out, the source type defaults to 'other' (not - * present in this enum). - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable favorite. If - * false, only return summary content for favorites. - * @param tags Tags that must be present on each favorite returned. - * @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 favorites defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAsync( - String resourceGroupName, - String resourceName, - FavoriteType favoriteType, - FavoriteSourceType sourceType, - Boolean canFetchContent, - List tags) { - return listWithResponseAsync(resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tags) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a list of favorites defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 favorites defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAsync( - String resourceGroupName, String resourceName) { - final FavoriteType favoriteType = null; - final FavoriteSourceType sourceType = null; - final Boolean canFetchContent = null; - final List tags = null; - return listWithResponseAsync(resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tags) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a list of favorites defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 favorites defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List list(String resourceGroupName, String resourceName) { - final FavoriteType favoriteType = null; - final FavoriteSourceType sourceType = null; - final Boolean canFetchContent = null; - final List tags = null; - return listAsync(resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tags).block(); - } - - /** - * Gets a list of favorites defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteType The type of favorite. Value can be either shared or user. - * @param sourceType Source type of favorite to return. When left out, the source type defaults to 'other' (not - * present in this enum). - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable favorite. If - * false, only return summary content for favorites. - * @param tags Tags that must be present on each favorite returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of favorites defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listWithResponse( - String resourceGroupName, - String resourceName, - FavoriteType favoriteType, - FavoriteSourceType sourceType, - Boolean canFetchContent, - List tags, - Context context) { - return listWithResponseAsync( - resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tags, context) - .block(); - } - - /** - * Get a single favorite by its FavoriteId, defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @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 single favorite by its FavoriteId, defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String favoriteId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (favoriteId == null) { - return Mono.error(new IllegalArgumentException("Parameter favoriteId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - favoriteId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a single favorite by its FavoriteId, defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single favorite by its FavoriteId, defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String favoriteId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (favoriteId == null) { - return Mono.error(new IllegalArgumentException("Parameter favoriteId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - favoriteId, - accept, - context); - } - - /** - * Get a single favorite by its FavoriteId, defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @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 single favorite by its FavoriteId, defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName, String favoriteId) { - return getWithResponseAsync(resourceGroupName, resourceName, favoriteId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get a single favorite by its FavoriteId, defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @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 single favorite by its FavoriteId, defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentFavoriteInner get( - String resourceGroupName, String resourceName, String favoriteId) { - return getAsync(resourceGroupName, resourceName, favoriteId).block(); - } - - /** - * Get a single favorite by its FavoriteId, defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single favorite by its FavoriteId, defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, favoriteId, context).block(); - } - - /** - * Adds a new favorites to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to create a new favorite and add it to an - * Application Insights component. - * @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 properties that define a favorite that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> addWithResponseAsync( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (favoriteId == null) { - return Mono.error(new IllegalArgumentException("Parameter favoriteId is required and cannot be null.")); - } - if (favoriteProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter favoriteProperties is required and cannot be null.")); - } else { - favoriteProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .add( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - favoriteId, - favoriteProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Adds a new favorites to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to create a new favorite and add it to an - * Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a favorite that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> addWithResponseAsync( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (favoriteId == null) { - return Mono.error(new IllegalArgumentException("Parameter favoriteId is required and cannot be null.")); - } - if (favoriteProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter favoriteProperties is required and cannot be null.")); - } else { - favoriteProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .add( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - favoriteId, - favoriteProperties, - accept, - context); - } - - /** - * Adds a new favorites to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to create a new favorite and add it to an - * Application Insights component. - * @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 properties that define a favorite that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono addAsync( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { - return addWithResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Adds a new favorites to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to create a new favorite and add it to an - * Application Insights component. - * @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 properties that define a favorite that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentFavoriteInner add( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { - return addAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties).block(); - } - - /** - * Adds a new favorites to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to create a new favorite and add it to an - * Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a favorite that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response addWithResponse( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, - Context context) { - return addWithResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties, context).block(); - } - - /** - * Updates a favorite that has already been added to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to update the existing favorite. - * @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 properties that define a favorite that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (favoriteId == null) { - return Mono.error(new IllegalArgumentException("Parameter favoriteId is required and cannot be null.")); - } - if (favoriteProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter favoriteProperties is required and cannot be null.")); - } else { - favoriteProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - favoriteId, - favoriteProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a favorite that has already been added to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to update the existing favorite. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a favorite that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (favoriteId == null) { - return Mono.error(new IllegalArgumentException("Parameter favoriteId is required and cannot be null.")); - } - if (favoriteProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter favoriteProperties is required and cannot be null.")); - } else { - favoriteProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - favoriteId, - favoriteProperties, - accept, - context); - } - - /** - * Updates a favorite that has already been added to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to update the existing favorite. - * @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 properties that define a favorite that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { - return updateWithResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates a favorite that has already been added to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to update the existing favorite. - * @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 properties that define a favorite that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentFavoriteInner update( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { - return updateAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties).block(); - } - - /** - * Updates a favorite that has already been added to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to update the existing favorite. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a favorite that is associated to an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, - Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties, context) - .block(); - } - - /** - * Remove a favorite that is associated to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String favoriteId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (favoriteId == null) { - return Mono.error(new IllegalArgumentException("Parameter favoriteId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - favoriteId, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Remove a favorite that is associated to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String favoriteId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (favoriteId == null) { - return Mono.error(new IllegalArgumentException("Parameter favoriteId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - favoriteId, - context); - } - - /** - * Remove a favorite that is associated to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName, String favoriteId) { - return deleteWithResponseAsync(resourceGroupName, resourceName, favoriteId) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Remove a favorite that is associated to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String favoriteId) { - deleteAsync(resourceGroupName, resourceName, favoriteId).block(); - } - - /** - * Remove a favorite that is associated to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, favoriteId, context).block(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesImpl.java deleted file mode 100644 index 3ed9a12e44ba8..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesImpl.java +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentFavorite; -import com.azure.resourcemanager.applicationinsights.models.FavoriteSourceType; -import com.azure.resourcemanager.applicationinsights.models.FavoriteType; -import com.azure.resourcemanager.applicationinsights.models.Favorites; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class FavoritesImpl implements Favorites { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FavoritesImpl.class); - - private final FavoritesClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public FavoritesImpl( - FavoritesClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public List list(String resourceGroupName, String resourceName) { - List inner = - this.serviceClient().list(resourceGroupName, resourceName); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ApplicationInsightsComponentFavoriteImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public Response> listWithResponse( - String resourceGroupName, - String resourceName, - FavoriteType favoriteType, - FavoriteSourceType sourceType, - Boolean canFetchContent, - List tags, - Context context) { - Response> inner = - this - .serviceClient() - .listWithResponse( - resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tags, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - inner - .getValue() - .stream() - .map(inner1 -> new ApplicationInsightsComponentFavoriteImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return null; - } - } - - public ApplicationInsightsComponentFavorite get(String resourceGroupName, String resourceName, String favoriteId) { - ApplicationInsightsComponentFavoriteInner inner = - this.serviceClient().get(resourceGroupName, resourceName, favoriteId); - if (inner != null) { - return new ApplicationInsightsComponentFavoriteImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, favoriteId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentFavoriteImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ApplicationInsightsComponentFavorite add( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { - ApplicationInsightsComponentFavoriteInner inner = - this.serviceClient().add(resourceGroupName, resourceName, favoriteId, favoriteProperties); - if (inner != null) { - return new ApplicationInsightsComponentFavoriteImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response addWithResponse( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, - Context context) { - Response inner = - this - .serviceClient() - .addWithResponse(resourceGroupName, resourceName, favoriteId, favoriteProperties, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentFavoriteImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ApplicationInsightsComponentFavorite update( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { - ApplicationInsightsComponentFavoriteInner inner = - this.serviceClient().update(resourceGroupName, resourceName, favoriteId, favoriteProperties); - if (inner != null) { - return new ApplicationInsightsComponentFavoriteImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, - Context context) { - Response inner = - this - .serviceClient() - .updateWithResponse(resourceGroupName, resourceName, favoriteId, favoriteProperties, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentFavoriteImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String resourceName, String favoriteId) { - this.serviceClient().delete(resourceGroupName, resourceName, favoriteId); - } - - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, favoriteId, context); - } - - private FavoritesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbookImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbookImpl.java deleted file mode 100644 index 3f25483ea1550..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbookImpl.java +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner; -import com.azure.resourcemanager.applicationinsights.models.Kind; -import com.azure.resourcemanager.applicationinsights.models.ManagedIdentity; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbook; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class MyWorkbookImpl implements MyWorkbook, MyWorkbook.Definition, MyWorkbook.Update { - private MyWorkbookInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public ManagedIdentity identity() { - return this.innerModel().identity(); - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public Map etag() { - Map inner = this.innerModel().etag(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public Kind kind() { - return this.innerModel().kind(); - } - - public String displayName() { - return this.innerModel().displayName(); - } - - public String serializedData() { - return this.innerModel().serializedData(); - } - - public String version() { - return this.innerModel().version(); - } - - public String timeModified() { - return this.innerModel().timeModified(); - } - - public String category() { - return this.innerModel().category(); - } - - public List tagsPropertiesTags() { - List inner = this.innerModel().tagsPropertiesTags(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String userId() { - return this.innerModel().userId(); - } - - public String sourceId() { - return this.innerModel().sourceId(); - } - - public String storageUri() { - return this.innerModel().storageUri(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public MyWorkbookInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String resourceName; - - private String createSourceId; - - private String updateSourceId; - - public MyWorkbookImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public MyWorkbook create() { - this.innerObject = - serviceManager - .serviceClient() - .getMyWorkbooks() - .createOrUpdateWithResponse( - resourceGroupName, resourceName, this.innerModel(), createSourceId, Context.NONE) - .getValue(); - return this; - } - - public MyWorkbook create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMyWorkbooks() - .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), createSourceId, context) - .getValue(); - return this; - } - - MyWorkbookImpl( - String name, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = new MyWorkbookInner(); - this.serviceManager = serviceManager; - this.resourceName = name; - this.createSourceId = null; - } - - public MyWorkbookImpl update() { - this.updateSourceId = null; - return this; - } - - public MyWorkbook apply() { - this.innerObject = - serviceManager - .serviceClient() - .getMyWorkbooks() - .updateWithResponse(resourceGroupName, resourceName, this.innerModel(), updateSourceId, Context.NONE) - .getValue(); - return this; - } - - public MyWorkbook apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMyWorkbooks() - .updateWithResponse(resourceGroupName, resourceName, this.innerModel(), updateSourceId, context) - .getValue(); - return this; - } - - MyWorkbookImpl( - MyWorkbookInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "myWorkbooks"); - } - - public MyWorkbook refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getMyWorkbooks() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE) - .getValue(); - return this; - } - - public MyWorkbook refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMyWorkbooks() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, context) - .getValue(); - return this; - } - - public MyWorkbookImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public MyWorkbookImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public MyWorkbookImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public MyWorkbookImpl withIdentity(ManagedIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public MyWorkbookImpl withName(String name) { - this.innerModel().withName(name); - return this; - } - - public MyWorkbookImpl withType(String type) { - this.innerModel().withType(type); - return this; - } - - public MyWorkbookImpl withEtag(Map etag) { - this.innerModel().withEtag(etag); - return this; - } - - public MyWorkbookImpl withKind(Kind kind) { - this.innerModel().withKind(kind); - return this; - } - - public MyWorkbookImpl withDisplayName(String displayName) { - this.innerModel().withDisplayName(displayName); - return this; - } - - public MyWorkbookImpl withSerializedData(String serializedData) { - this.innerModel().withSerializedData(serializedData); - return this; - } - - public MyWorkbookImpl withVersion(String version) { - this.innerModel().withVersion(version); - return this; - } - - public MyWorkbookImpl withCategory(String category) { - this.innerModel().withCategory(category); - return this; - } - - public MyWorkbookImpl withTagsPropertiesTags(List tagsPropertiesTags) { - this.innerModel().withTagsPropertiesTags(tagsPropertiesTags); - return this; - } - - public MyWorkbookImpl withSourceId(String sourceId) { - this.innerModel().withSourceId(sourceId); - return this; - } - - public MyWorkbookImpl withStorageUri(String storageUri) { - this.innerModel().withStorageUri(storageUri); - return this; - } - - public MyWorkbookImpl withSourceIdParameter(String sourceId) { - this.createSourceId = sourceId; - return this; - } - - public MyWorkbookImpl sourceIdParameter(String sourceId) { - this.updateSourceId = sourceId; - return this; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksClientImpl.java deleted file mode 100644 index f17f27b69c992..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksClientImpl.java +++ /dev/null @@ -1,1513 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.serializer.CollectionFormat; -import com.azure.core.util.serializer.JacksonAdapter; -import com.azure.resourcemanager.applicationinsights.fluent.MyWorkbooksClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner; -import com.azure.resourcemanager.applicationinsights.models.CategoryType; -import com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbooksListResult; -import java.util.List; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in MyWorkbooksClient. */ -public final class MyWorkbooksClientImpl implements MyWorkbooksClient { - private final ClientLogger logger = new ClientLogger(MyWorkbooksClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final MyWorkbooksService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of MyWorkbooksClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - MyWorkbooksClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(MyWorkbooksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientMyWorkbooks to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - private interface MyWorkbooksService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights" - + "/myWorkbooks") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorDefinitionException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("category") CategoryType category, - @QueryParam("tags") String tags, - @QueryParam("sourceId") String sourceId, - @QueryParam("canFetchContent") Boolean canFetchContent, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/myWorkbooks") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorDefinitionException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("category") CategoryType category, - @QueryParam("tags") String tags, - @QueryParam("canFetchContent") Boolean canFetchContent, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights" - + "/myWorkbooks/{resourceName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorDefinitionException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights" - + "/myWorkbooks/{resourceName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ErrorDefinitionException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights" - + "/myWorkbooks/{resourceName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ErrorDefinitionException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("sourceId") String sourceId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MyWorkbookInner workbookProperties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights" - + "/myWorkbooks/{resourceName}") - @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(ErrorDefinitionException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("sourceId") String sourceId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MyWorkbookInner workbookProperties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorDefinitionException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ErrorDefinitionException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get all private workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, CategoryType category, List tags, String sourceId, Boolean canFetchContent) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (category == null) { - return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); - return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - category, - tagsConverted, - sourceId, - canFetchContent, - apiVersion, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all private workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, - CategoryType category, - List tags, - String sourceId, - Boolean canFetchContent, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (category == null) { - return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); - context = this.client.mergeContext(context); - return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - category, - tagsConverted, - sourceId, - canFetchContent, - apiVersion, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get all private workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, CategoryType category, List tags, String sourceId, Boolean canFetchContent) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, category, tags, sourceId, canFetchContent), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Get all private workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, CategoryType category) { - final List tags = null; - final String sourceId = null; - final Boolean canFetchContent = null; - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, category, tags, sourceId, canFetchContent), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Get all private workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, - CategoryType category, - List tags, - String sourceId, - Boolean canFetchContent, - Context context) { - return new PagedFlux<>( - () -> - listByResourceGroupSinglePageAsync( - resourceGroupName, category, tags, sourceId, canFetchContent, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Get all private workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category) { - final List tags = null; - final String sourceId = null; - final Boolean canFetchContent = null; - return new PagedIterable<>( - listByResourceGroupAsync(resourceGroupName, category, tags, sourceId, canFetchContent)); - } - - /** - * Get all private workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup( - String resourceGroupName, - CategoryType category, - List tags, - String sourceId, - Boolean canFetchContent, - Context context) { - return new PagedIterable<>( - listByResourceGroupAsync(resourceGroupName, category, tags, sourceId, canFetchContent, context)); - } - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - CategoryType category, List tags, Boolean canFetchContent) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (category == null) { - return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - category, - tagsConverted, - canFetchContent, - apiVersion, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - CategoryType category, List tags, Boolean canFetchContent, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (category == null) { - return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - category, - tagsConverted, - canFetchContent, - apiVersion, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(CategoryType category, List tags, Boolean canFetchContent) { - return new PagedFlux<>( - () -> listSinglePageAsync(category, tags, canFetchContent), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(CategoryType category) { - final List tags = null; - final Boolean canFetchContent = null; - return new PagedFlux<>( - () -> listSinglePageAsync(category, tags, canFetchContent), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - CategoryType category, List tags, Boolean canFetchContent, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(category, tags, canFetchContent, context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(CategoryType category) { - final List tags = null; - final Boolean canFetchContent = null; - return new PagedIterable<>(listAsync(category, tags, canFetchContent)); - } - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - CategoryType category, List tags, Boolean canFetchContent, Context context) { - return new PagedIterable<>(listAsync(category, tags, canFetchContent, context)); - } - - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - apiVersion, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - apiVersion, - accept, - context); - } - - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MyWorkbookInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupAsync(resourceGroupName, resourceName).block(); - } - - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - apiVersion, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - apiVersion, - accept, - context); - } - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName) { - return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName) { - deleteAsync(resourceGroupName, resourceName).block(); - } - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Create a new private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties, String sourceId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workbookProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter workbookProperties is required and cannot be null.")); - } else { - workbookProperties.validate(); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - sourceId, - apiVersion, - workbookProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a new private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String resourceName, - MyWorkbookInner workbookProperties, - String sourceId, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workbookProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter workbookProperties is required and cannot be null.")); - } else { - workbookProperties.validate(); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - sourceId, - apiVersion, - workbookProperties, - accept, - context); - } - - /** - * Create a new private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties, String sourceId) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create a new private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { - final String sourceId = null; - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create a new private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MyWorkbookInner createOrUpdate( - String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { - final String sourceId = null; - return createOrUpdateAsync(resourceGroupName, resourceName, workbookProperties, sourceId).block(); - } - - /** - * Create a new private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - MyWorkbookInner workbookProperties, - String sourceId, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId, context) - .block(); - } - - /** - * Updates a private workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties, String sourceId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workbookProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter workbookProperties is required and cannot be null.")); - } else { - workbookProperties.validate(); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - sourceId, - apiVersion, - workbookProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a private workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - MyWorkbookInner workbookProperties, - String sourceId, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workbookProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter workbookProperties is required and cannot be null.")); - } else { - workbookProperties.validate(); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - sourceId, - apiVersion, - workbookProperties, - accept, - context); - } - - /** - * Updates a private workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties, String sourceId) { - return updateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates a private workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { - final String sourceId = null; - return updateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates a private workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MyWorkbookInner update(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { - final String sourceId = null; - return updateAsync(resourceGroupName, resourceName, workbookProperties, sourceId).block(); - } - - /** - * Updates a private workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - MyWorkbookInner workbookProperties, - String sourceId, - Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksImpl.java deleted file mode 100644 index 3cc5c8b27f80d..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksImpl.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.MyWorkbooksClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner; -import com.azure.resourcemanager.applicationinsights.models.CategoryType; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbook; -import com.azure.resourcemanager.applicationinsights.models.MyWorkbooks; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -public final class MyWorkbooksImpl implements MyWorkbooks { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MyWorkbooksImpl.class); - - private final MyWorkbooksClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public MyWorkbooksImpl( - MyWorkbooksClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, category); - return Utils.mapPage(inner, inner1 -> new MyWorkbookImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup( - String resourceGroupName, - CategoryType category, - List tags, - String sourceId, - Boolean canFetchContent, - Context context) { - PagedIterable inner = - this - .serviceClient() - .listByResourceGroup(resourceGroupName, category, tags, sourceId, canFetchContent, context); - return Utils.mapPage(inner, inner1 -> new MyWorkbookImpl(inner1, this.manager())); - } - - public PagedIterable list(CategoryType category) { - PagedIterable inner = this.serviceClient().list(category); - return Utils.mapPage(inner, inner1 -> new MyWorkbookImpl(inner1, this.manager())); - } - - public PagedIterable list( - CategoryType category, List tags, Boolean canFetchContent, Context context) { - PagedIterable inner = this.serviceClient().list(category, tags, canFetchContent, context); - return Utils.mapPage(inner, inner1 -> new MyWorkbookImpl(inner1, this.manager())); - } - - public MyWorkbook getByResourceGroup(String resourceGroupName, String resourceName) { - MyWorkbookInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); - if (inner != null) { - return new MyWorkbookImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new MyWorkbookImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String resourceName) { - this.serviceClient().delete(resourceGroupName, resourceName); - } - - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); - } - - public MyWorkbook getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "myWorkbooks"); - if (resourceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'myWorkbooks'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "myWorkbooks"); - if (resourceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'myWorkbooks'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "myWorkbooks"); - if (resourceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'myWorkbooks'.", id))); - } - this.deleteWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "myWorkbooks"); - if (resourceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'myWorkbooks'.", id))); - } - return this.deleteWithResponse(resourceGroupName, resourceName, context); - } - - private MyWorkbooksClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } - - public MyWorkbookImpl define(String name) { - return new MyWorkbookImpl(name, this.manager()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationImpl.java deleted file mode 100644 index 6d6134702d47f..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner; -import com.azure.resourcemanager.applicationinsights.models.Operation; -import com.azure.resourcemanager.applicationinsights.models.OperationDisplay; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - OperationImpl( - OperationInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsClientImpl.java deleted file mode 100644 index 7bd03e87bf856..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -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.applicationinsights.fluent.OperationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner; -import com.azure.resourcemanager.applicationinsights.models.OperationListResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final OperationsService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - private interface OperationsService { - @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.Insights/operations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Lists all of the available insights REST API operations. - * - * @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 result of the request to list Azure Workbooks operations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the available insights REST API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Azure Workbooks operations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Lists all of the available insights REST API operations. - * - * @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 result of the request to list Azure Workbooks operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the available insights REST API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Azure Workbooks operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the available insights REST API operations. - * - * @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 result of the request to list Azure Workbooks operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists all of the available insights REST API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Azure Workbooks operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @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 result of the request to list Azure Workbooks operations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Azure Workbooks operations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsImpl.java deleted file mode 100644 index 38dc6c14deda5..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.OperationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner; -import com.azure.resourcemanager.applicationinsights.models.Operation; -import com.azure.resourcemanager.applicationinsights.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public OperationsImpl( - OperationsClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsClientImpl.java deleted file mode 100644 index f4c29a646c834..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsClientImpl.java +++ /dev/null @@ -1,661 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -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.applicationinsights.fluent.ProactiveDetectionConfigurationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentProactiveDetectionConfigurationInner; -import java.util.List; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ProactiveDetectionConfigurationsClient. - */ -public final class ProactiveDetectionConfigurationsClientImpl implements ProactiveDetectionConfigurationsClient { - private final ClientLogger logger = new ClientLogger(ProactiveDetectionConfigurationsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ProactiveDetectionConfigurationsService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of ProactiveDetectionConfigurationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ProactiveDetectionConfigurationsClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy - .create( - ProactiveDetectionConfigurationsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientProactiveDetectionConfigurations - * to be used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - private interface ProactiveDetectionConfigurationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/ProactiveDetectionConfigs") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> list( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("ConfigurationId") String configurationId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("ConfigurationId") String configurationId, - @BodyParam("application/json") - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets a list of ProactiveDetection configurations of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 ProactiveDetection configurations of an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> - listWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of ProactiveDetection configurations of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of ProactiveDetection configurations of an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> - listWithResponseAsync(String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context); - } - - /** - * Gets a list of ProactiveDetection configurations of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 ProactiveDetection configurations of an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAsync( - String resourceGroupName, String resourceName) { - return listWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a list of ProactiveDetection configurations of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 ProactiveDetection configurations of an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List list( - String resourceGroupName, String resourceName) { - return listAsync(resourceGroupName, resourceName).block(); - } - - /** - * Gets a list of ProactiveDetection configurations of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of ProactiveDetection configurations of an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listWithResponse( - String resourceGroupName, String resourceName, Context context) { - return listWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Get the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @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 ProactiveDetection configuration for this configuration id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String configurationId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (configurationId == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - configurationId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the ProactiveDetection configuration for this configuration id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String configurationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (configurationId == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - configurationId, - accept, - context); - } - - /** - * Get the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @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 ProactiveDetection configuration for this configuration id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName, String configurationId) { - return getWithResponseAsync(resourceGroupName, resourceName, configurationId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @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 ProactiveDetection configuration for this configuration id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentProactiveDetectionConfigurationInner get( - String resourceGroupName, String resourceName, String configurationId) { - return getAsync(resourceGroupName, resourceName, configurationId).block(); - } - - /** - * Get the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the ProactiveDetection configuration for this configuration id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, String configurationId, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, configurationId, context).block(); - } - - /** - * Update the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. - * @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 properties that define a ProactiveDetection configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (configurationId == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationId is required and cannot be null.")); - } - if (proactiveDetectionProperties == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter proactiveDetectionProperties is required and cannot be null.")); - } else { - proactiveDetectionProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - configurationId, - proactiveDetectionProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a ProactiveDetection configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (configurationId == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationId is required and cannot be null.")); - } - if (proactiveDetectionProperties == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter proactiveDetectionProperties is required and cannot be null.")); - } else { - proactiveDetectionProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - configurationId, - proactiveDetectionProperties, - accept, - context); - } - - /** - * Update the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. - * @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 properties that define a ProactiveDetection configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String resourceName, - String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties) { - return updateWithResponseAsync(resourceGroupName, resourceName, configurationId, proactiveDetectionProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. - * @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 properties that define a ProactiveDetection configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentProactiveDetectionConfigurationInner update( - String resourceGroupName, - String resourceName, - String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties) { - return updateAsync(resourceGroupName, resourceName, configurationId, proactiveDetectionProperties).block(); - } - - /** - * Update the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a ProactiveDetection configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, - Context context) { - return updateWithResponseAsync( - resourceGroupName, resourceName, configurationId, proactiveDetectionProperties, context) - .block(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsImpl.java deleted file mode 100644 index 6cb1a46b21f20..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsImpl.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.ProactiveDetectionConfigurationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentProactiveDetectionConfigurationInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration; -import com.azure.resourcemanager.applicationinsights.models.ProactiveDetectionConfigurations; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class ProactiveDetectionConfigurationsImpl implements ProactiveDetectionConfigurations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProactiveDetectionConfigurationsImpl.class); - - private final ProactiveDetectionConfigurationsClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public ProactiveDetectionConfigurationsImpl( - ProactiveDetectionConfigurationsClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public List list( - String resourceGroupName, String resourceName) { - List inner = - this.serviceClient().list(resourceGroupName, resourceName); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map( - inner1 -> - new ApplicationInsightsComponentProactiveDetectionConfigurationImpl( - inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public Response> listWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response> inner = - this.serviceClient().listWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - inner - .getValue() - .stream() - .map( - inner1 -> - new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return null; - } - } - - public ApplicationInsightsComponentProactiveDetectionConfiguration get( - String resourceGroupName, String resourceName, String configurationId) { - ApplicationInsightsComponentProactiveDetectionConfigurationInner inner = - this.serviceClient().get(resourceGroupName, resourceName, configurationId); - if (inner != null) { - return new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String resourceName, String configurationId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, configurationId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ApplicationInsightsComponentProactiveDetectionConfiguration update( - String resourceGroupName, - String resourceName, - String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties) { - ApplicationInsightsComponentProactiveDetectionConfigurationInner inner = - this.serviceClient().update(resourceGroupName, resourceName, configurationId, proactiveDetectionProperties); - if (inner != null) { - return new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, - Context context) { - Response inner = - this - .serviceClient() - .updateWithResponse( - resourceGroupName, resourceName, configurationId, proactiveDetectionProperties, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private ProactiveDetectionConfigurationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestImpl.java deleted file mode 100644 index 5ed4a1f18a054..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestImpl.java +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.WebTestInner; -import com.azure.resourcemanager.applicationinsights.models.TagsResource; -import com.azure.resourcemanager.applicationinsights.models.WebTest; -import com.azure.resourcemanager.applicationinsights.models.WebTestGeolocation; -import com.azure.resourcemanager.applicationinsights.models.WebTestKind; -import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesConfiguration; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class WebTestImpl implements WebTest, WebTest.Definition, WebTest.Update { - private WebTestInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public WebTestKind kind() { - return this.innerModel().kind(); - } - - public String syntheticMonitorId() { - return this.innerModel().syntheticMonitorId(); - } - - public String webTestName() { - return this.innerModel().webTestName(); - } - - public String description() { - return this.innerModel().description(); - } - - public Boolean enabled() { - return this.innerModel().enabled(); - } - - public Integer frequency() { - return this.innerModel().frequency(); - } - - public Integer timeout() { - return this.innerModel().timeout(); - } - - public WebTestKind webTestKind() { - return this.innerModel().webTestKind(); - } - - public Boolean retryEnabled() { - return this.innerModel().retryEnabled(); - } - - public List locations() { - List inner = this.innerModel().locations(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public WebTestPropertiesConfiguration configuration() { - return this.innerModel().configuration(); - } - - public String provisioningState() { - return this.innerModel().provisioningState(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public WebTestInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String webTestName; - - private TagsResource updateWebTestTags; - - public WebTestImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public WebTest create() { - this.innerObject = - serviceManager - .serviceClient() - .getWebTests() - .createOrUpdateWithResponse(resourceGroupName, webTestName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public WebTest create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebTests() - .createOrUpdateWithResponse(resourceGroupName, webTestName, this.innerModel(), context) - .getValue(); - return this; - } - - WebTestImpl(String name, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = new WebTestInner(); - this.serviceManager = serviceManager; - this.webTestName = name; - } - - public WebTestImpl update() { - this.updateWebTestTags = new TagsResource(); - return this; - } - - public WebTest apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWebTests() - .updateTagsWithResponse(resourceGroupName, webTestName, updateWebTestTags, Context.NONE) - .getValue(); - return this; - } - - public WebTest apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebTests() - .updateTagsWithResponse(resourceGroupName, webTestName, updateWebTestTags, context) - .getValue(); - return this; - } - - WebTestImpl( - WebTestInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.webTestName = Utils.getValueFromIdByName(innerObject.id(), "webtests"); - } - - public WebTest refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWebTests() - .getByResourceGroupWithResponse(resourceGroupName, webTestName, Context.NONE) - .getValue(); - return this; - } - - public WebTest refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebTests() - .getByResourceGroupWithResponse(resourceGroupName, webTestName, context) - .getValue(); - return this; - } - - public WebTestImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public WebTestImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public WebTestImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateWebTestTags.withTags(tags); - return this; - } - } - - public WebTestImpl withKind(WebTestKind kind) { - this.innerModel().withKind(kind); - return this; - } - - public WebTestImpl withSyntheticMonitorId(String syntheticMonitorId) { - this.innerModel().withSyntheticMonitorId(syntheticMonitorId); - return this; - } - - public WebTestImpl withWebTestName(String webTestName) { - this.innerModel().withWebTestName(webTestName); - return this; - } - - public WebTestImpl withDescription(String description) { - this.innerModel().withDescription(description); - return this; - } - - public WebTestImpl withEnabled(Boolean enabled) { - this.innerModel().withEnabled(enabled); - return this; - } - - public WebTestImpl withFrequency(Integer frequency) { - this.innerModel().withFrequency(frequency); - return this; - } - - public WebTestImpl withTimeout(Integer timeout) { - this.innerModel().withTimeout(timeout); - return this; - } - - public WebTestImpl withWebTestKind(WebTestKind webTestKind) { - this.innerModel().withWebTestKind(webTestKind); - return this; - } - - public WebTestImpl withRetryEnabled(Boolean retryEnabled) { - this.innerModel().withRetryEnabled(retryEnabled); - return this; - } - - public WebTestImpl withLocations(List locations) { - this.innerModel().withLocations(locations); - return this; - } - - public WebTestImpl withConfiguration(WebTestPropertiesConfiguration configuration) { - this.innerModel().withConfiguration(configuration); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsClientImpl.java deleted file mode 100644 index daa15222f4f68..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsClientImpl.java +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -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.applicationinsights.fluent.WebTestLocationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentWebTestLocationInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsWebTestLocationsListResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in WebTestLocationsClient. */ -public final class WebTestLocationsClientImpl implements WebTestLocationsClient { - private final ClientLogger logger = new ClientLogger(WebTestLocationsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final WebTestLocationsService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of WebTestLocationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WebTestLocationsClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(WebTestLocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientWebTestLocations to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - private interface WebTestLocationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/syntheticmonitorlocations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets a list of web test locations available to this Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 web test locations available to this Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of web test locations available to this Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of web test locations available to this Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); - } - - /** - * Gets a list of web test locations available to this Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 web test locations available to this Application Insights component. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName)); - } - - /** - * Gets a list of web test locations available to this Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of web test locations available to this Application Insights component. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String resourceName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context)); - } - - /** - * Gets a list of web test locations available to this Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 web test locations available to this Application Insights component. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String resourceName) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); - } - - /** - * Gets a list of web test locations available to this Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of web test locations available to this Application Insights component. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String resourceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsImpl.java deleted file mode 100644 index 7efef3d33d281..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.WebTestLocationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentWebTestLocationInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentWebTestLocation; -import com.azure.resourcemanager.applicationinsights.models.WebTestLocations; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class WebTestLocationsImpl implements WebTestLocations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebTestLocationsImpl.class); - - private final WebTestLocationsClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public WebTestLocationsImpl( - WebTestLocationsClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list( - String resourceGroupName, String resourceName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, resourceName); - return Utils - .mapPage(inner, inner1 -> new ApplicationInsightsComponentWebTestLocationImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String resourceName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, resourceName, context); - return Utils - .mapPage(inner, inner1 -> new ApplicationInsightsComponentWebTestLocationImpl(inner1, this.manager())); - } - - private WebTestLocationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsClientImpl.java deleted file mode 100644 index 8eedfa097134c..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsClientImpl.java +++ /dev/null @@ -1,1519 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -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.applicationinsights.fluent.WebTestsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.WebTestInner; -import com.azure.resourcemanager.applicationinsights.models.TagsResource; -import com.azure.resourcemanager.applicationinsights.models.WebTestListResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in WebTestsClient. */ -public final class WebTestsClientImpl implements WebTestsClient { - private final ClientLogger logger = new ClientLogger(WebTestsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final WebTestsService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of WebTestsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WebTestsClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = RestProxy.create(WebTestsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientWebTests to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - private interface WebTestsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests" - + "/{webTestName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("webTestName") String webTestName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests" - + "/{webTestName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("webTestName") String webTestName, - @BodyParam("application/json") WebTestInner webTestDefinition, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests" - + "/{webTestName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateTags( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("webTestName") String webTestName, - @BodyParam("application/json") TagsResource webTestTags, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests" - + "/{webTestName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("webTestName") String webTestName, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/webtests") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{componentName}/webtests") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByComponent( - @HostParam("$host") String endpoint, - @PathParam("componentName") String componentName, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByComponentNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get all Application Insights web tests defined within a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Application Insights web tests defined within a specified resource group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all Application Insights web tests defined within a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined within a specified resource group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get all Application Insights web tests defined within a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Application Insights web tests defined within a specified resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Get all Application Insights web tests defined within a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined within a specified resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Get all Application Insights web tests defined within a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Application Insights web tests defined within a specified resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Get all Application Insights web tests defined within a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined within a specified resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Get a specific Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @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 specific Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String webTestName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (webTestName == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - webTestName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a specific Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String webTestName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (webTestName == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - webTestName, - accept, - context); - } - - /** - * Get a specific Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @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 specific Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String webTestName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, webTestName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get a specific Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @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 specific Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebTestInner getByResourceGroup(String resourceGroupName, String webTestName) { - return getByResourceGroupAsync(resourceGroupName, webTestName).block(); - } - - /** - * Get a specific Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String webTestName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, webTestName, context).block(); - } - - /** - * Creates or updates an Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web - * test definition. - * @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 an Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String webTestName, WebTestInner webTestDefinition) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (webTestName == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); - } - if (webTestDefinition == null) { - return Mono - .error(new IllegalArgumentException("Parameter webTestDefinition is required and cannot be null.")); - } else { - webTestDefinition.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - webTestName, - webTestDefinition, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates an Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web - * test definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String webTestName, WebTestInner webTestDefinition, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (webTestName == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); - } - if (webTestDefinition == null) { - return Mono - .error(new IllegalArgumentException("Parameter webTestDefinition is required and cannot be null.")); - } else { - webTestDefinition.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - webTestName, - webTestDefinition, - accept, - context); - } - - /** - * Creates or updates an Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web - * test definition. - * @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 an Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String webTestName, WebTestInner webTestDefinition) { - return createOrUpdateWithResponseAsync(resourceGroupName, webTestName, webTestDefinition) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates or updates an Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web - * test definition. - * @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 an Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebTestInner createOrUpdate(String resourceGroupName, String webTestName, WebTestInner webTestDefinition) { - return createOrUpdateAsync(resourceGroupName, webTestName, webTestDefinition).block(); - } - - /** - * Creates or updates an Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web - * test definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String webTestName, WebTestInner webTestDefinition, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, webTestName, webTestDefinition, context).block(); - } - - /** - * Creates or updates an Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. - * @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 an Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateTagsWithResponseAsync( - String resourceGroupName, String webTestName, TagsResource webTestTags) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (webTestName == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); - } - if (webTestTags == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestTags is required and cannot be null.")); - } else { - webTestTags.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .updateTags( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - webTestName, - webTestTags, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates an Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateTagsWithResponseAsync( - String resourceGroupName, String webTestName, TagsResource webTestTags, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (webTestName == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); - } - if (webTestTags == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestTags is required and cannot be null.")); - } else { - webTestTags.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .updateTags( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - webTestName, - webTestTags, - accept, - context); - } - - /** - * Creates or updates an Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. - * @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 an Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync(String resourceGroupName, String webTestName, TagsResource webTestTags) { - return updateTagsWithResponseAsync(resourceGroupName, webTestName, webTestTags) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates or updates an Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. - * @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 an Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WebTestInner updateTags(String resourceGroupName, String webTestName, TagsResource webTestTags) { - return updateTagsAsync(resourceGroupName, webTestName, webTestTags).block(); - } - - /** - * Creates or updates an Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateTagsWithResponse( - String resourceGroupName, String webTestName, TagsResource webTestTags, Context context) { - return updateTagsWithResponseAsync(resourceGroupName, webTestName, webTestTags, context).block(); - } - - /** - * Deletes an Application Insights web test. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String webTestName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (webTestName == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - webTestName, - apiVersion, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes an Application Insights web test. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String webTestName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (webTestName == null) { - return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - webTestName, - apiVersion, - context); - } - - /** - * Deletes an Application Insights web test. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String webTestName) { - return deleteWithResponseAsync(resourceGroupName, webTestName).flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes an Application Insights web test. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String webTestName) { - deleteAsync(resourceGroupName, webTestName).block(); - } - - /** - * Deletes an Application Insights web test. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String webTestName, Context context) { - return deleteWithResponseAsync(resourceGroupName, webTestName, context).block(); - } - - /** - * Get all Application Insights web test alerts definitions within a subscription. - * - * @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 Application Insights web test alerts definitions within a subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all Application Insights web test alerts definitions within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web test alerts definitions within a subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get all Application Insights web test alerts definitions within a subscription. - * - * @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 Application Insights web test alerts definitions within a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get all Application Insights web test alerts definitions within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web test alerts definitions within a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get all Application Insights web test alerts definitions within a subscription. - * - * @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 Application Insights web test alerts definitions within a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Get all Application Insights web test alerts definitions within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web test alerts definitions within a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get all Application Insights web tests defined for the specified component. - * - * @param componentName The name of the Application Insights component resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Application Insights web tests defined for the specified component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByComponentSinglePageAsync( - String componentName, String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listByComponent( - this.client.getEndpoint(), - componentName, - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all Application Insights web tests defined for the specified component. - * - * @param componentName The name of the Application Insights component resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined for the specified component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByComponentSinglePageAsync( - String componentName, String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByComponent( - this.client.getEndpoint(), - componentName, - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get all Application Insights web tests defined for the specified component. - * - * @param componentName The name of the Application Insights component resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Application Insights web tests defined for the specified component. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByComponentAsync(String componentName, String resourceGroupName) { - return new PagedFlux<>( - () -> listByComponentSinglePageAsync(componentName, resourceGroupName), - nextLink -> listByComponentNextSinglePageAsync(nextLink)); - } - - /** - * Get all Application Insights web tests defined for the specified component. - * - * @param componentName The name of the Application Insights component resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined for the specified component. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByComponentAsync( - String componentName, String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByComponentSinglePageAsync(componentName, resourceGroupName, context), - nextLink -> listByComponentNextSinglePageAsync(nextLink, context)); - } - - /** - * Get all Application Insights web tests defined for the specified component. - * - * @param componentName The name of the Application Insights component resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Application Insights web tests defined for the specified component. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByComponent(String componentName, String resourceGroupName) { - return new PagedIterable<>(listByComponentAsync(componentName, resourceGroupName)); - } - - /** - * Get all Application Insights web tests defined for the specified component. - * - * @param componentName The name of the Application Insights component resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined for the specified component. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByComponent( - String componentName, String resourceGroupName, Context context) { - return new PagedIterable<>(listByComponentAsync(componentName, resourceGroupName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @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 0 or more Application Insights web test definitions. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of 0 or more Application Insights web test definitions. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @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 0 or more Application Insights web test definitions. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of 0 or more Application Insights web test definitions. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @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 0 or more Application Insights web test definitions. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByComponentNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByComponentNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of 0 or more Application Insights web test definitions. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByComponentNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByComponentNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsImpl.java deleted file mode 100644 index 9e8423640e25f..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsImpl.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.WebTestsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.WebTestInner; -import com.azure.resourcemanager.applicationinsights.models.WebTest; -import com.azure.resourcemanager.applicationinsights.models.WebTests; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class WebTestsImpl implements WebTests { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebTestsImpl.class); - - private final WebTestsClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public WebTestsImpl( - WebTestsClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); - } - - public WebTest getByResourceGroup(String resourceGroupName, String webTestName) { - WebTestInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, webTestName); - if (inner != null) { - return new WebTestImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getByResourceGroupWithResponse( - String resourceGroupName, String webTestName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, webTestName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WebTestImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String webTestName) { - this.serviceClient().delete(resourceGroupName, webTestName); - } - - public Response deleteWithResponse(String resourceGroupName, String webTestName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, webTestName, context); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); - } - - public PagedIterable listByComponent(String componentName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByComponent(componentName, resourceGroupName); - return Utils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); - } - - public PagedIterable listByComponent(String componentName, String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByComponent(componentName, resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); - } - - public WebTest getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String webTestName = Utils.getValueFromIdByName(id, "webtests"); - if (webTestName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'webtests'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, webTestName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String webTestName = Utils.getValueFromIdByName(id, "webtests"); - if (webTestName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'webtests'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, webTestName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String webTestName = Utils.getValueFromIdByName(id, "webtests"); - if (webTestName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'webtests'.", id))); - } - this.deleteWithResponse(resourceGroupName, webTestName, Context.NONE).getValue(); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String webTestName = Utils.getValueFromIdByName(id, "webtests"); - if (webTestName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'webtests'.", id))); - } - return this.deleteWithResponse(resourceGroupName, webTestName, context); - } - - private WebTestsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } - - public WebTestImpl define(String name) { - return new WebTestImpl(name, this.manager()); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationImpl.java deleted file mode 100644 index a2932ebd1c70f..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.resourcemanager.applicationinsights.fluent.models.WorkItemConfigurationInner; -import com.azure.resourcemanager.applicationinsights.models.WorkItemConfiguration; - -public final class WorkItemConfigurationImpl implements WorkItemConfiguration { - private WorkItemConfigurationInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - WorkItemConfigurationImpl( - WorkItemConfigurationInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String connectorId() { - return this.innerModel().connectorId(); - } - - public String configDisplayName() { - return this.innerModel().configDisplayName(); - } - - public Boolean isDefault() { - return this.innerModel().isDefault(); - } - - public String id() { - return this.innerModel().id(); - } - - public String configProperties() { - return this.innerModel().configProperties(); - } - - public WorkItemConfigurationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsClientImpl.java deleted file mode 100644 index 11824385eb9d7..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsClientImpl.java +++ /dev/null @@ -1,1223 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -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.applicationinsights.fluent.WorkItemConfigurationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.WorkItemConfigurationInner; -import com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurationErrorException; -import com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurationsListResult; -import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in WorkItemConfigurationsClient. */ -public final class WorkItemConfigurationsClientImpl implements WorkItemConfigurationsClient { - private final ClientLogger logger = new ClientLogger(WorkItemConfigurationsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final WorkItemConfigurationsService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of WorkItemConfigurationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkItemConfigurationsClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy - .create(WorkItemConfigurationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientWorkItemConfigurations to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - private interface WorkItemConfigurationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/WorkItemConfigs") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(WorkItemConfigurationErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/WorkItemConfigs") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @BodyParam("application/json") WorkItemCreateConfiguration workItemConfigurationProperties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/DefaultWorkItemConfig") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDefault( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/WorkItemConfigs/{workItemConfigId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("workItemConfigId") String workItemConfigId, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/WorkItemConfigs/{workItemConfigId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getItem( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("workItemConfigId") String workItemConfigId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/WorkItemConfigs/{workItemConfigId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateItem( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, - @PathParam("workItemConfigId") String workItemConfigId, - @BodyParam("application/json") WorkItemCreateConfiguration workItemConfigurationProperties, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets the list work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkItemConfigurationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list work item configurations that exist for the application. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkItemConfigurationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list work item configurations that exist for the application. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); - } - - /** - * Gets the list work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkItemConfigurationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list work item configurations that exist for the application. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName)); - } - - /** - * Gets the list work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkItemConfigurationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list work item configurations that exist for the application. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String resourceName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context)); - } - - /** - * Gets the list work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkItemConfigurationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list work item configurations that exist for the application. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); - } - - /** - * Gets the list work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkItemConfigurationErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list work item configurations that exist for the application. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String resourceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); - } - - /** - * Create a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. - * @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 work item configuration associated with an application insights resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workItemConfigurationProperties == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workItemConfigurationProperties is required and cannot be null.")); - } else { - workItemConfigurationProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - workItemConfigurationProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return work item configuration associated with an application insights resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String resourceName, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workItemConfigurationProperties == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workItemConfigurationProperties is required and cannot be null.")); - } else { - workItemConfigurationProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - workItemConfigurationProperties, - accept, - context); - } - - /** - * Create a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. - * @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 work item configuration associated with an application insights resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { - return createWithResponseAsync(resourceGroupName, resourceName, workItemConfigurationProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. - * @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 work item configuration associated with an application insights resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkItemConfigurationInner create( - String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { - return createAsync(resourceGroupName, resourceName, workItemConfigurationProperties).block(); - } - - /** - * Create a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return work item configuration associated with an application insights resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String resourceName, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context) { - return createWithResponseAsync(resourceGroupName, resourceName, workItemConfigurationProperties, context) - .block(); - } - - /** - * Gets default work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 default work item configurations that exist for the application. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDefaultWithResponseAsync( - String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getDefault( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets default work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return default work item configurations that exist for the application. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDefaultWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getDefault( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - accept, - context); - } - - /** - * Gets default work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 default work item configurations that exist for the application. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDefaultAsync(String resourceGroupName, String resourceName) { - return getDefaultWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets default work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 default work item configurations that exist for the application. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkItemConfigurationInner getDefault(String resourceGroupName, String resourceName) { - return getDefaultAsync(resourceGroupName, resourceName).block(); - } - - /** - * Gets default work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return default work item configurations that exist for the application. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDefaultWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getDefaultWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Delete a work item configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String workItemConfigId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workItemConfigId == null) { - return Mono - .error(new IllegalArgumentException("Parameter workItemConfigId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - workItemConfigId, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a work item configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String workItemConfigId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workItemConfigId == null) { - return Mono - .error(new IllegalArgumentException("Parameter workItemConfigId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - workItemConfigId, - context); - } - - /** - * Delete a work item configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName, String workItemConfigId) { - return deleteWithResponseAsync(resourceGroupName, resourceName, workItemConfigId) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a work item configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String workItemConfigId) { - deleteAsync(resourceGroupName, resourceName, workItemConfigId).block(); - } - - /** - * Delete a work item configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, workItemConfigId, context).block(); - } - - /** - * Gets specified work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @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 specified work item configuration for an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getItemWithResponseAsync( - String resourceGroupName, String resourceName, String workItemConfigId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workItemConfigId == null) { - return Mono - .error(new IllegalArgumentException("Parameter workItemConfigId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getItem( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - workItemConfigId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets specified work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specified work item configuration for an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getItemWithResponseAsync( - String resourceGroupName, String resourceName, String workItemConfigId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workItemConfigId == null) { - return Mono - .error(new IllegalArgumentException("Parameter workItemConfigId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getItem( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - workItemConfigId, - accept, - context); - } - - /** - * Gets specified work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @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 specified work item configuration for an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getItemAsync( - String resourceGroupName, String resourceName, String workItemConfigId) { - return getItemWithResponseAsync(resourceGroupName, resourceName, workItemConfigId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets specified work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @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 specified work item configuration for an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkItemConfigurationInner getItem(String resourceGroupName, String resourceName, String workItemConfigId) { - return getItemAsync(resourceGroupName, resourceName, workItemConfigId).block(); - } - - /** - * Gets specified work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specified work item configuration for an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getItemWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context) { - return getItemWithResponseAsync(resourceGroupName, resourceName, workItemConfigId, context).block(); - } - - /** - * Update a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. - * @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 work item configuration associated with an application insights resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateItemWithResponseAsync( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workItemConfigId == null) { - return Mono - .error(new IllegalArgumentException("Parameter workItemConfigId is required and cannot be null.")); - } - if (workItemConfigurationProperties == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workItemConfigurationProperties is required and cannot be null.")); - } else { - workItemConfigurationProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .updateItem( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - workItemConfigId, - workItemConfigurationProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return work item configuration associated with an application insights resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateItemWithResponseAsync( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workItemConfigId == null) { - return Mono - .error(new IllegalArgumentException("Parameter workItemConfigId is required and cannot be null.")); - } - if (workItemConfigurationProperties == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workItemConfigurationProperties is required and cannot be null.")); - } else { - workItemConfigurationProperties.validate(); - } - final String apiVersion = "2015-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .updateItem( - this.client.getEndpoint(), - resourceGroupName, - apiVersion, - this.client.getSubscriptionId(), - resourceName, - workItemConfigId, - workItemConfigurationProperties, - accept, - context); - } - - /** - * Update a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. - * @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 work item configuration associated with an application insights resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateItemAsync( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties) { - return updateItemWithResponseAsync( - resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. - * @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 work item configuration associated with an application insights resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkItemConfigurationInner updateItem( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties) { - return updateItemAsync(resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties) - .block(); - } - - /** - * Update a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return work item configuration associated with an application insights resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateItemWithResponse( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context) { - return updateItemWithResponseAsync( - resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties, context) - .block(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsImpl.java deleted file mode 100644 index bc64d729afadd..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsImpl.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.WorkItemConfigurationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.WorkItemConfigurationInner; -import com.azure.resourcemanager.applicationinsights.models.WorkItemConfiguration; -import com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurations; -import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class WorkItemConfigurationsImpl implements WorkItemConfigurations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkItemConfigurationsImpl.class); - - private final WorkItemConfigurationsClient innerClient; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public WorkItemConfigurationsImpl( - WorkItemConfigurationsClient innerClient, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String resourceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName); - return Utils.mapPage(inner, inner1 -> new WorkItemConfigurationImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String resourceName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, resourceName, context); - return Utils.mapPage(inner, inner1 -> new WorkItemConfigurationImpl(inner1, this.manager())); - } - - public WorkItemConfiguration create( - String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { - WorkItemConfigurationInner inner = - this.serviceClient().create(resourceGroupName, resourceName, workItemConfigurationProperties); - if (inner != null) { - return new WorkItemConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createWithResponse( - String resourceGroupName, - String resourceName, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context) { - Response inner = - this - .serviceClient() - .createWithResponse(resourceGroupName, resourceName, workItemConfigurationProperties, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkItemConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkItemConfiguration getDefault(String resourceGroupName, String resourceName) { - WorkItemConfigurationInner inner = this.serviceClient().getDefault(resourceGroupName, resourceName); - if (inner != null) { - return new WorkItemConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getDefaultWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().getDefaultWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkItemConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String resourceName, String workItemConfigId) { - this.serviceClient().delete(resourceGroupName, resourceName, workItemConfigId); - } - - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, workItemConfigId, context); - } - - public WorkItemConfiguration getItem(String resourceGroupName, String resourceName, String workItemConfigId) { - WorkItemConfigurationInner inner = - this.serviceClient().getItem(resourceGroupName, resourceName, workItemConfigId); - if (inner != null) { - return new WorkItemConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getItemWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context) { - Response inner = - this.serviceClient().getItemWithResponse(resourceGroupName, resourceName, workItemConfigId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkItemConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkItemConfiguration updateItem( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties) { - WorkItemConfigurationInner inner = - this - .serviceClient() - .updateItem(resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties); - if (inner != null) { - return new WorkItemConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response updateItemWithResponse( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context) { - Response inner = - this - .serviceClient() - .updateItemWithResponse( - resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkItemConfigurationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private WorkItemConfigurationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookImpl.java deleted file mode 100644 index 4a85cd1206191..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookImpl.java +++ /dev/null @@ -1,341 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookInner; -import com.azure.resourcemanager.applicationinsights.models.Kind; -import com.azure.resourcemanager.applicationinsights.models.ManagedIdentityAutoGenerated; -import com.azure.resourcemanager.applicationinsights.models.SharedTypeKind; -import com.azure.resourcemanager.applicationinsights.models.Workbook; -import com.azure.resourcemanager.applicationinsights.models.WorkbookUpdateParameters; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class WorkbookImpl implements Workbook, Workbook.Definition, Workbook.Update { - private WorkbookInner innerObject; - - private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public Kind kind() { - return this.innerModel().kind(); - } - - public String displayName() { - return this.innerModel().displayName(); - } - - public String serializedData() { - return this.innerModel().serializedData(); - } - - public String version() { - return this.innerModel().version(); - } - - public String timeModified() { - return this.innerModel().timeModified(); - } - - public String category() { - return this.innerModel().category(); - } - - public List tagsPropertiesTags() { - List inner = this.innerModel().tagsPropertiesTags(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String userId() { - return this.innerModel().userId(); - } - - public String sourceId() { - return this.innerModel().sourceId(); - } - - public String storageUri() { - return this.innerModel().storageUri(); - } - - public ManagedIdentityAutoGenerated identity() { - return this.innerModel().identity(); - } - - public Map etag() { - Map inner = this.innerModel().etag(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public WorkbookInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String resourceName; - - private String createSourceId; - - private String updateSourceId; - - private WorkbookUpdateParameters updateWorkbookUpdateParameters; - - public WorkbookImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public Workbook create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkbooks() - .createOrUpdateWithResponse( - resourceGroupName, resourceName, this.innerModel(), createSourceId, Context.NONE) - .getValue(); - return this; - } - - public Workbook create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkbooks() - .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), createSourceId, context) - .getValue(); - return this; - } - - WorkbookImpl(String name, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = new WorkbookInner(); - this.serviceManager = serviceManager; - this.resourceName = name; - this.createSourceId = null; - } - - public WorkbookImpl update() { - this.updateSourceId = null; - this.updateWorkbookUpdateParameters = new WorkbookUpdateParameters(); - return this; - } - - public Workbook apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkbooks() - .updateWithResponse( - resourceGroupName, resourceName, updateSourceId, updateWorkbookUpdateParameters, Context.NONE) - .getValue(); - return this; - } - - public Workbook apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkbooks() - .updateWithResponse( - resourceGroupName, resourceName, updateSourceId, updateWorkbookUpdateParameters, context) - .getValue(); - return this; - } - - WorkbookImpl( - WorkbookInner innerObject, - com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "workbooks"); - } - - public Workbook refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkbooks() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE) - .getValue(); - return this; - } - - public Workbook refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkbooks() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, context) - .getValue(); - return this; - } - - public WorkbookImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public WorkbookImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public WorkbookImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateWorkbookUpdateParameters.withTags(tags); - return this; - } - } - - public WorkbookImpl withKind(Kind kind) { - this.innerModel().withKind(kind); - return this; - } - - public WorkbookImpl withDisplayName(String displayName) { - if (isInCreateMode()) { - this.innerModel().withDisplayName(displayName); - return this; - } else { - this.updateWorkbookUpdateParameters.withDisplayName(displayName); - return this; - } - } - - public WorkbookImpl withSerializedData(String serializedData) { - if (isInCreateMode()) { - this.innerModel().withSerializedData(serializedData); - return this; - } else { - this.updateWorkbookUpdateParameters.withSerializedData(serializedData); - return this; - } - } - - public WorkbookImpl withVersion(String version) { - this.innerModel().withVersion(version); - return this; - } - - public WorkbookImpl withCategory(String category) { - if (isInCreateMode()) { - this.innerModel().withCategory(category); - return this; - } else { - this.updateWorkbookUpdateParameters.withCategory(category); - return this; - } - } - - public WorkbookImpl withTagsPropertiesTags(List tagsPropertiesTags) { - if (isInCreateMode()) { - this.innerModel().withTagsPropertiesTags(tagsPropertiesTags); - return this; - } else { - this.updateWorkbookUpdateParameters.withTagsPropertiesTags(tagsPropertiesTags); - return this; - } - } - - public WorkbookImpl withSourceId(String sourceId) { - this.innerModel().withSourceId(sourceId); - return this; - } - - public WorkbookImpl withStorageUri(String storageUri) { - this.innerModel().withStorageUri(storageUri); - return this; - } - - public WorkbookImpl withIdentity(ManagedIdentityAutoGenerated identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public WorkbookImpl withEtag(Map etag) { - this.innerModel().withEtag(etag); - return this; - } - - public WorkbookImpl withName(String name) { - this.innerModel().withName(name); - return this; - } - - public WorkbookImpl withType(String type) { - this.innerModel().withType(type); - return this; - } - - public WorkbookImpl withSourceIdParameter(String sourceId) { - this.createSourceId = sourceId; - return this; - } - - public WorkbookImpl withKind(SharedTypeKind kind) { - this.updateWorkbookUpdateParameters.withKind(kind); - return this; - } - - public WorkbookImpl sourceId(String sourceId) { - this.updateSourceId = sourceId; - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplateImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplateImpl.java new file mode 100644 index 0000000000000..ec78274f15373 --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplateImpl.java @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.implementation; + +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner; +import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplate; +import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateGallery; +import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateLocalizedGallery; +import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateUpdateParameters; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class WorkbookTemplateImpl + implements WorkbookTemplate, WorkbookTemplate.Definition, WorkbookTemplate.Update { + private WorkbookTemplateInner innerObject; + + private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Integer priority() { + return this.innerModel().priority(); + } + + public String author() { + return this.innerModel().author(); + } + + public Object templateData() { + return this.innerModel().templateData(); + } + + public List galleries() { + List inner = this.innerModel().galleries(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Map> localized() { + Map> inner = this.innerModel().localized(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public WorkbookTemplateInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private WorkbookTemplateUpdateParameters updateWorkbookTemplateUpdateParameters; + + public WorkbookTemplateImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public WorkbookTemplate create() { + this.innerObject = + serviceManager + .serviceClient() + .getWorkbookTemplates() + .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public WorkbookTemplate create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWorkbookTemplates() + .createOrUpdateWithResponse(resourceGroupName, resourceName, this.innerModel(), context) + .getValue(); + return this; + } + + WorkbookTemplateImpl( + String name, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { + this.innerObject = new WorkbookTemplateInner(); + this.serviceManager = serviceManager; + this.resourceName = name; + } + + public WorkbookTemplateImpl update() { + this.updateWorkbookTemplateUpdateParameters = new WorkbookTemplateUpdateParameters(); + return this; + } + + public WorkbookTemplate apply() { + this.innerObject = + serviceManager + .serviceClient() + .getWorkbookTemplates() + .updateWithResponse( + resourceGroupName, resourceName, updateWorkbookTemplateUpdateParameters, Context.NONE) + .getValue(); + return this; + } + + public WorkbookTemplate apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWorkbookTemplates() + .updateWithResponse(resourceGroupName, resourceName, updateWorkbookTemplateUpdateParameters, context) + .getValue(); + return this; + } + + WorkbookTemplateImpl( + WorkbookTemplateInner innerObject, + com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "workbooktemplates"); + } + + public WorkbookTemplate refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getWorkbookTemplates() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE) + .getValue(); + return this; + } + + public WorkbookTemplate refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWorkbookTemplates() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, context) + .getValue(); + return this; + } + + public WorkbookTemplateImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public WorkbookTemplateImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public WorkbookTemplateImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateWorkbookTemplateUpdateParameters.withTags(tags); + return this; + } + } + + public WorkbookTemplateImpl withPriority(Integer priority) { + if (isInCreateMode()) { + this.innerModel().withPriority(priority); + return this; + } else { + this.updateWorkbookTemplateUpdateParameters.withPriority(priority); + return this; + } + } + + public WorkbookTemplateImpl withAuthor(String author) { + if (isInCreateMode()) { + this.innerModel().withAuthor(author); + return this; + } else { + this.updateWorkbookTemplateUpdateParameters.withAuthor(author); + return this; + } + } + + public WorkbookTemplateImpl withTemplateData(Object templateData) { + if (isInCreateMode()) { + this.innerModel().withTemplateData(templateData); + return this; + } else { + this.updateWorkbookTemplateUpdateParameters.withTemplateData(templateData); + return this; + } + } + + public WorkbookTemplateImpl withGalleries(List galleries) { + if (isInCreateMode()) { + this.innerModel().withGalleries(galleries); + return this; + } else { + this.updateWorkbookTemplateUpdateParameters.withGalleries(galleries); + return this; + } + } + + public WorkbookTemplateImpl withLocalized(Map> localized) { + if (isInCreateMode()) { + this.innerModel().withLocalized(localized); + return this; + } else { + this.updateWorkbookTemplateUpdateParameters.withLocalized(localized); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesClientImpl.java similarity index 62% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsClientImpl.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesClientImpl.java index 83b844bf42d0d..9d5b0d26dc582 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesClientImpl.java @@ -12,424 +12,393 @@ import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; 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.applicationinsights.fluent.ExportConfigurationsClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentExportConfigurationInner; -import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportRequest; -import java.util.List; +import com.azure.resourcemanager.applicationinsights.fluent.WorkbookTemplatesClient; +import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner; +import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplateUpdateParameters; +import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplatesListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ExportConfigurationsClient. */ -public final class ExportConfigurationsClientImpl implements ExportConfigurationsClient { - private final ClientLogger logger = new ClientLogger(ExportConfigurationsClientImpl.class); +/** An instance of this class provides access to all the operations defined in WorkbookTemplatesClient. */ +public final class WorkbookTemplatesClientImpl implements WorkbookTemplatesClient { + private final ClientLogger logger = new ClientLogger(WorkbookTemplatesClientImpl.class); /** The proxy service used to perform REST calls. */ - private final ExportConfigurationsService service; + private final WorkbookTemplatesService service; /** The service client containing this operation class. */ private final ApplicationInsightsManagementClientImpl client; /** - * Initializes an instance of ExportConfigurationsClientImpl. + * Initializes an instance of WorkbookTemplatesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ExportConfigurationsClientImpl(ApplicationInsightsManagementClientImpl client) { + WorkbookTemplatesClientImpl(ApplicationInsightsManagementClientImpl client) { this.service = - RestProxy - .create(ExportConfigurationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + RestProxy.create(WorkbookTemplatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ApplicationInsightsManagementClientExportConfigurations to be used by + * The interface defining all the services for ApplicationInsightsManagementClientWorkbookTemplates to be used by * the proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface ExportConfigurationsService { + private interface WorkbookTemplatesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/exportconfiguration") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights" + + "/workbooktemplates") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> list( + Mono> listByResourceGroup( @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/exportconfiguration") + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights" + + "/workbooktemplates/{resourceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( + Mono> getByResourceGroup( @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ApplicationInsightsComponentExportRequest exportProperties, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/exportconfiguration/{exportId}") - @ExpectedResponses({200}) + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights" + + "/workbooktemplates/{resourceName}") + @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( + Mono> delete( @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("exportId") String exportId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/exportconfiguration/{exportId}") - @ExpectedResponses({200}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights" + + "/workbooktemplates/{resourceName}") + @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> createOrUpdate( @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("exportId") String exportId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") WorkbookTemplateInner workbookTemplateProperties, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" - + "/{resourceName}/exportconfiguration/{exportId}") + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights" + + "/workbooktemplates/{resourceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( + Mono> update( @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("exportId") String exportId, - @BodyParam("application/json") ApplicationInsightsComponentExportRequest exportProperties, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a list of Continuous Export configuration of an Application Insights component. + * Get all Workbook templates defined within a specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. * @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 Continuous Export configuration of an Application Insights component. + * @return all Workbook templates defined within a specified resource group. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listWithResponseAsync( - String resourceGroupName, String resourceName) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2015-05-01"; final String accept = "application/json"; return FluxUtil .withContext( context -> service - .list( + .listByResourceGroup( this.client.getEndpoint(), - resourceGroupName, - apiVersion, this.client.getSubscriptionId(), - resourceName, + resourceGroupName, + this.client.getApiVersion(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of Continuous Export configuration of an Application Insights component. + * Get all Workbook templates defined within a specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configuration of an Application Insights component. + * @return all Workbook templates defined within a specified resource group. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2015-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( + .listByResourceGroup( this.client.getEndpoint(), - resourceGroupName, - apiVersion, this.client.getSubscriptionId(), - resourceName, + resourceGroupName, + this.client.getApiVersion(), accept, - context); + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); } /** - * Gets a list of Continuous Export configuration of an Application Insights component. + * Get all Workbook templates defined within a specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. * @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 Continuous Export configuration of an Application Insights component. + * @return all Workbook templates defined within a specified resource group. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAsync( - String resourceGroupName, String resourceName) { - return listWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName)); } /** - * Gets a list of Continuous Export configuration of an Application Insights component. + * Get all Workbook templates defined within a specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configuration of an Application Insights component. + * @return all Workbook templates defined within a specified resource group. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List list( - String resourceGroupName, String resourceName) { - return listAsync(resourceGroupName, resourceName).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context)); } /** - * Gets a list of Continuous Export configuration of an Application Insights component. + * Get all Workbook templates defined within a specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Workbook templates defined within a specified resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Get all Workbook templates defined within a specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configuration of an Application Insights component. + * @return all Workbook templates defined within a specified resource group. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listWithResponse( - String resourceGroupName, String resourceName, Context context) { - return listWithResponseAsync(resourceGroupName, resourceName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** - * Create a Continuous Export configuration of an Application Insights component. + * Get a single workbook template by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a - * Application Insights component. * @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 Continuous Export configurations. + * @return a single workbook template by its resourceName. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties) { + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (exportProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter exportProperties is required and cannot be null.")); - } else { - exportProperties.validate(); - } - final String apiVersion = "2015-05-01"; final String accept = "application/json"; return FluxUtil .withContext( context -> service - .create( + .getByResourceGroup( this.client.getEndpoint(), - resourceGroupName, - apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, - exportProperties, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create a Continuous Export configuration of an Application Insights component. + * Get a single workbook template by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a - * Application Insights component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configurations. + * @return a single workbook template by its resourceName. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentExportRequest exportProperties, - Context context) { + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String resourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (exportProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter exportProperties is required and cannot be null.")); - } else { - exportProperties.validate(); - } - final String apiVersion = "2015-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .create( + .getByResourceGroup( this.client.getEndpoint(), - resourceGroupName, - apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, - exportProperties, + this.client.getApiVersion(), accept, context); } /** - * Create a Continuous Export configuration of an Application Insights component. + * Get a single workbook template by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a - * Application Insights component. * @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 Continuous Export configurations. + * @return a single workbook template by its resourceName. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createAsync( - String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties) { - return createWithResponseAsync(resourceGroupName, resourceName, exportProperties) + private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) .flatMap( - (Response> res) -> { + (Response res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -439,82 +408,68 @@ private Mono> createA } /** - * Create a Continuous Export configuration of an Application Insights component. + * Get a single workbook template by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a - * Application Insights component. * @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 Continuous Export configurations. + * @return a single workbook template by its resourceName. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List create( - String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties) { - return createAsync(resourceGroupName, resourceName, exportProperties).block(); + public WorkbookTemplateInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupAsync(resourceGroupName, resourceName).block(); } /** - * Create a Continuous Export configuration of an Application Insights component. + * Get a single workbook template by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a - * Application Insights component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configurations. + * @return a single workbook template by its resourceName. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> createWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentExportRequest exportProperties, - Context context) { - return createWithResponseAsync(resourceGroupName, resourceName, exportProperties, context).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** - * Delete a Continuous Export configuration of an Application Insights component. + * Delete a workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. * @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 properties that define a Continuous Export configuration. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String exportId) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (exportId == null) { - return Mono.error(new IllegalArgumentException("Parameter exportId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -522,251 +477,240 @@ private Mono> del service .delete( this.client.getEndpoint(), - resourceGroupName, - apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, - exportId, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a Continuous Export configuration of an Application Insights component. + * Delete a workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a Continuous Export configuration. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String exportId, Context context) { + private Mono> deleteWithResponseAsync( + String resourceGroupName, String resourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (exportId == null) { - return Mono.error(new IllegalArgumentException("Parameter exportId is required and cannot be null.")); - } - final String apiVersion = "2015-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .delete( this.client.getEndpoint(), - resourceGroupName, - apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, - exportId, + this.client.getApiVersion(), accept, context); } /** - * Delete a Continuous Export configuration of an Application Insights component. + * Delete a workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. * @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 properties that define a Continuous Export configuration. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String resourceName, String exportId) { - return deleteWithResponseAsync(resourceGroupName, resourceName, exportId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + private Mono deleteAsync(String resourceGroupName, String resourceName) { + return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap((Response res) -> Mono.empty()); } /** - * Delete a Continuous Export configuration of an Application Insights component. + * Delete a workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. * @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 properties that define a Continuous Export configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentExportConfigurationInner delete( - String resourceGroupName, String resourceName, String exportId) { - return deleteAsync(resourceGroupName, resourceName, exportId).block(); + public void delete(String resourceGroupName, String resourceName) { + deleteAsync(resourceGroupName, resourceName).block(); } /** - * Delete a Continuous Export configuration of an Application Insights component. + * Delete a workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a Continuous Export configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, exportId, context).block(); + public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** - * Get the Continuous Export configuration for this export id. + * Create a new workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. + * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. * @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 Continuous Export configuration for this export id. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String exportId) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (exportId == null) { - return Mono.error(new IllegalArgumentException("Parameter exportId is required and cannot be null.")); + if (workbookTemplateProperties == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter workbookTemplateProperties is required and cannot be null.")); + } else { + workbookTemplateProperties.validate(); } - final String apiVersion = "2015-05-01"; final String accept = "application/json"; return FluxUtil .withContext( context -> service - .get( + .createOrUpdate( this.client.getEndpoint(), - resourceGroupName, - apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, - exportId, + this.client.getApiVersion(), + workbookTemplateProperties, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get the Continuous Export configuration for this export id. + * Create a new workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. + * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Continuous Export configuration for this export id. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String exportId, Context context) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String resourceName, + WorkbookTemplateInner workbookTemplateProperties, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (exportId == null) { - return Mono.error(new IllegalArgumentException("Parameter exportId is required and cannot be null.")); + if (workbookTemplateProperties == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter workbookTemplateProperties is required and cannot be null.")); + } else { + workbookTemplateProperties.validate(); } - final String apiVersion = "2015-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .get( + .createOrUpdate( this.client.getEndpoint(), - resourceGroupName, - apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, - exportId, + this.client.getApiVersion(), + workbookTemplateProperties, accept, context); } /** - * Get the Continuous Export configuration for this export id. + * Create a new workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. + * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. * @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 Continuous Export configuration for this export id. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName, String exportId) { - return getWithResponseAsync(resourceGroupName, resourceName, exportId) + private Mono createOrUpdateAsync( + String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateProperties) .flatMap( - (Response res) -> { + (Response res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -776,87 +720,82 @@ private Mono getAsync( } /** - * Get the Continuous Export configuration for this export id. + * Create a new workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. + * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. * @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 Continuous Export configuration for this export id. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentExportConfigurationInner get( - String resourceGroupName, String resourceName, String exportId) { - return getAsync(resourceGroupName, resourceName, exportId).block(); + public WorkbookTemplateInner createOrUpdate( + String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties) { + return createOrUpdateAsync(resourceGroupName, resourceName, workbookTemplateProperties).block(); } /** - * Get the Continuous Export configuration for this export id. + * Create a new workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. + * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Continuous Export configuration for this export id. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, exportId, context).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String resourceName, + WorkbookTemplateInner workbookTemplateProperties, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateProperties, context) + .block(); } /** - * Update the Continuous Export configuration for this export id. + * Updates a workbook template that has already been added. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param exportProperties Properties that need to be specified to update the Continuous Export configuration. + * @param workbookTemplateUpdateParameters Properties that need to be specified to patch a workbook template. * @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 properties that define a Continuous Export configuration. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties) { + WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (exportId == null) { - return Mono.error(new IllegalArgumentException("Parameter exportId is required and cannot be null.")); - } - if (exportProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter exportProperties is required and cannot be null.")); - } else { - exportProperties.validate(); + if (workbookTemplateUpdateParameters != null) { + workbookTemplateUpdateParameters.validate(); } - final String apiVersion = "2015-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -864,36 +803,33 @@ private Mono> upd service .update( this.client.getEndpoint(), - resourceGroupName, - apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, - exportId, - exportProperties, + this.client.getApiVersion(), + workbookTemplateUpdateParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update the Continuous Export configuration for this export id. + * Updates a workbook template that has already been added. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param exportProperties Properties that need to be specified to update the Continuous Export configuration. + * @param workbookTemplateUpdateParameters Properties that need to be specified to patch a workbook template. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a Continuous Export configuration. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties, + WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -901,65 +837,55 @@ private Mono> upd new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - if (exportId == null) { - return Mono.error(new IllegalArgumentException("Parameter exportId is required and cannot be null.")); + if (workbookTemplateUpdateParameters != null) { + workbookTemplateUpdateParameters.validate(); } - if (exportProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter exportProperties is required and cannot be null.")); - } else { - exportProperties.validate(); - } - final String apiVersion = "2015-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .update( this.client.getEndpoint(), - resourceGroupName, - apiVersion, this.client.getSubscriptionId(), + resourceGroupName, resourceName, - exportId, - exportProperties, + this.client.getApiVersion(), + workbookTemplateUpdateParameters, accept, context); } /** - * Update the Continuous Export configuration for this export id. + * Updates a workbook template that has already been added. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param exportProperties Properties that need to be specified to update the Continuous Export configuration. + * @param workbookTemplateUpdateParameters Properties that need to be specified to patch a workbook template. * @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 properties that define a Continuous Export configuration. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties) { - return updateWithResponseAsync(resourceGroupName, resourceName, exportId, exportProperties) + WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters) { + return updateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters) .flatMap( - (Response res) -> { + (Response res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -969,46 +895,64 @@ private Mono updateAsync( } /** - * Update the Continuous Export configuration for this export id. + * Updates a workbook template that has already been added. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param exportProperties Properties that need to be specified to update the Continuous Export configuration. * @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 properties that define a Continuous Export configuration. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentExportConfigurationInner update( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties) { - return updateAsync(resourceGroupName, resourceName, exportId, exportProperties).block(); + private Mono updateAsync(String resourceGroupName, String resourceName) { + final WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters = null; + return updateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Updates a workbook template that has already been added. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @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 an Application Insights workbook template definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkbookTemplateInner update(String resourceGroupName, String resourceName) { + final WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters = null; + return updateAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters).block(); } /** - * Update the Continuous Export configuration for this export id. + * Updates a workbook template that has already been added. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param exportProperties Properties that need to be specified to update the Continuous Export configuration. + * @param workbookTemplateUpdateParameters Properties that need to be specified to patch a workbook template. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a Continuous Export configuration. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( + public Response updateWithResponse( String resourceGroupName, String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties, + WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, exportId, exportProperties, context).block(); + return updateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters, context) + .block(); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesImpl.java similarity index 63% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksImpl.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesImpl.java index 70fcf57d4d890..6b44e27c64a9f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesImpl.java @@ -9,77 +9,56 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookInner; -import com.azure.resourcemanager.applicationinsights.models.CategoryType; -import com.azure.resourcemanager.applicationinsights.models.Workbook; -import com.azure.resourcemanager.applicationinsights.models.Workbooks; +import com.azure.resourcemanager.applicationinsights.fluent.WorkbookTemplatesClient; +import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner; +import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplate; +import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplates; import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; -public final class WorkbooksImpl implements Workbooks { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbooksImpl.class); +public final class WorkbookTemplatesImpl implements WorkbookTemplates { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbookTemplatesImpl.class); - private final WorkbooksClient innerClient; + private final WorkbookTemplatesClient innerClient; private final com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager; - public WorkbooksImpl( - WorkbooksClient innerClient, + public WorkbookTemplatesImpl( + WorkbookTemplatesClient innerClient, com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list(CategoryType category) { - PagedIterable inner = this.serviceClient().list(category); - return Utils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new WorkbookTemplateImpl(inner1, this.manager())); } - public PagedIterable list( - CategoryType category, List tags, Boolean canFetchContent, Context context) { - PagedIterable inner = this.serviceClient().list(category, tags, canFetchContent, context); - return Utils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new WorkbookTemplateImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, category); - return Utils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup( - String resourceGroupName, - CategoryType category, - List tags, - String sourceId, - Boolean canFetchContent, - Context context) { - PagedIterable inner = - this - .serviceClient() - .listByResourceGroup(resourceGroupName, category, tags, sourceId, canFetchContent, context); - return Utils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); - } - - public Workbook getByResourceGroup(String resourceGroupName, String resourceName) { - WorkbookInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); + public WorkbookTemplate getByResourceGroup(String resourceGroupName, String resourceName) { + WorkbookTemplateInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); if (inner != null) { - return new WorkbookImpl(inner, this.manager()); + return new WorkbookTemplateImpl(inner, this.manager()); } else { return null; } } - public Response getByResourceGroupWithResponse( + public Response getByResourceGroupWithResponse( String resourceGroupName, String resourceName, Context context) { - Response inner = + Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkbookImpl(inner.getValue(), this.manager())); + new WorkbookTemplateImpl(inner.getValue(), this.manager())); } else { return null; } @@ -93,7 +72,7 @@ public Response deleteWithResponse(String resourceGroupName, String resour return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); } - public Workbook getById(String id) { + public WorkbookTemplate getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw logger @@ -102,17 +81,19 @@ public Workbook getById(String id) { String .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "workbooks"); + String resourceName = Utils.getValueFromIdByName(id, "workbooktemplates"); if (resourceName == null) { throw logger .logExceptionAsError( new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workbooks'.", id))); + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw logger @@ -121,12 +102,14 @@ public Response getByIdWithResponse(String id, Context context) { String .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "workbooks"); + String resourceName = Utils.getValueFromIdByName(id, "workbooktemplates"); if (resourceName == null) { throw logger .logExceptionAsError( new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workbooks'.", id))); + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context); } @@ -140,12 +123,14 @@ public void deleteById(String id) { String .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "workbooks"); + String resourceName = Utils.getValueFromIdByName(id, "workbooktemplates"); if (resourceName == null) { throw logger .logExceptionAsError( new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workbooks'.", id))); + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id))); } this.deleteWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } @@ -159,17 +144,19 @@ public Response deleteByIdWithResponse(String id, Context context) { String .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "workbooks"); + String resourceName = Utils.getValueFromIdByName(id, "workbooktemplates"); if (resourceName == null) { throw logger .logExceptionAsError( new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workbooks'.", id))); + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id))); } return this.deleteWithResponse(resourceGroupName, resourceName, context); } - private WorkbooksClient serviceClient() { + private WorkbookTemplatesClient serviceClient() { return this.innerClient; } @@ -177,7 +164,7 @@ private com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager return this.serviceManager; } - public WorkbookImpl define(String name) { - return new WorkbookImpl(name, this.manager()); + public WorkbookTemplateImpl define(String name) { + return new WorkbookTemplateImpl(name, this.manager()); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksClientImpl.java deleted file mode 100644 index b6e479c8d9f19..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksClientImpl.java +++ /dev/null @@ -1,1512 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.serializer.CollectionFormat; -import com.azure.core.util.serializer.JacksonAdapter; -import com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient; -import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookInner; -import com.azure.resourcemanager.applicationinsights.models.CategoryType; -import com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException; -import com.azure.resourcemanager.applicationinsights.models.WorkbookUpdateParameters; -import com.azure.resourcemanager.applicationinsights.models.WorkbooksListResult; -import java.util.List; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in WorkbooksClient. */ -public final class WorkbooksClientImpl implements WorkbooksClient { - private final ClientLogger logger = new ClientLogger(WorkbooksClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final WorkbooksService service; - - /** The service client containing this operation class. */ - private final ApplicationInsightsManagementClientImpl client; - - /** - * Initializes an instance of WorkbooksClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkbooksClientImpl(ApplicationInsightsManagementClientImpl client) { - this.service = - RestProxy.create(WorkbooksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationInsightsManagementClientWorkbooks to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ApplicationInsightsM") - private interface WorkbooksService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/workbooks") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(WorkbookErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("category") CategoryType category, - @QueryParam("tags") String tags, - @QueryParam("canFetchContent") Boolean canFetchContent, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(WorkbookErrorException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("category") CategoryType category, - @QueryParam("tags") String tags, - @QueryParam("sourceId") String sourceId, - @QueryParam("canFetchContent") Boolean canFetchContent, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks" - + "/{resourceName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(WorkbookErrorException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks" - + "/{resourceName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(WorkbookErrorException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks" - + "/{resourceName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(WorkbookErrorException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("sourceId") String sourceId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkbookInner workbookProperties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks" - + "/{resourceName}") - @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(WorkbookErrorException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("sourceId") String sourceId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkbookUpdateParameters workbookUpdateParameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(WorkbookErrorException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(WorkbookErrorException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - CategoryType category, List tags, Boolean canFetchContent) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (category == null) { - return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - category, - tagsConverted, - canFetchContent, - apiVersion, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - CategoryType category, List tags, Boolean canFetchContent, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (category == null) { - return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - category, - tagsConverted, - canFetchContent, - apiVersion, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(CategoryType category, List tags, Boolean canFetchContent) { - return new PagedFlux<>( - () -> listSinglePageAsync(category, tags, canFetchContent), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(CategoryType category) { - final List tags = null; - final Boolean canFetchContent = null; - return new PagedFlux<>( - () -> listSinglePageAsync(category, tags, canFetchContent), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - CategoryType category, List tags, Boolean canFetchContent, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(category, tags, canFetchContent, context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(CategoryType category) { - final List tags = null; - final Boolean canFetchContent = null; - return new PagedIterable<>(listAsync(category, tags, canFetchContent)); - } - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - CategoryType category, List tags, Boolean canFetchContent, Context context) { - return new PagedIterable<>(listAsync(category, tags, canFetchContent, context)); - } - - /** - * Get all Workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, CategoryType category, List tags, String sourceId, Boolean canFetchContent) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (category == null) { - return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); - return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - category, - tagsConverted, - sourceId, - canFetchContent, - apiVersion, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all Workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, - CategoryType category, - List tags, - String sourceId, - Boolean canFetchContent, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (category == null) { - return Mono.error(new IllegalArgumentException("Parameter category is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); - context = this.client.mergeContext(context); - return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - category, - tagsConverted, - sourceId, - canFetchContent, - apiVersion, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get all Workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, CategoryType category, List tags, String sourceId, Boolean canFetchContent) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, category, tags, sourceId, canFetchContent), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Get all Workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, CategoryType category) { - final List tags = null; - final String sourceId = null; - final Boolean canFetchContent = null; - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, category, tags, sourceId, canFetchContent), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Get all Workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, - CategoryType category, - List tags, - String sourceId, - Boolean canFetchContent, - Context context) { - return new PagedFlux<>( - () -> - listByResourceGroupSinglePageAsync( - resourceGroupName, category, tags, sourceId, canFetchContent, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Get all Workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category) { - final List tags = null; - final String sourceId = null; - final Boolean canFetchContent = null; - return new PagedIterable<>( - listByResourceGroupAsync(resourceGroupName, category, tags, sourceId, canFetchContent)); - } - - /** - * Get all Workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbooks defined within a specified resource group and category. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup( - String resourceGroupName, - CategoryType category, - List tags, - String sourceId, - Boolean canFetchContent, - Context context) { - return new PagedIterable<>( - listByResourceGroupAsync(resourceGroupName, category, tags, sourceId, canFetchContent, context)); - } - - /** - * Get a single workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - apiVersion, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a single workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - apiVersion, - accept, - context); - } - - /** - * Get a single workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get a single workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkbookInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupAsync(resourceGroupName, resourceName).block(); - } - - /** - * Get a single workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Delete a workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - apiVersion, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - apiVersion, - accept, - context); - } - - /** - * Delete a workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName) { - return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName) { - deleteAsync(resourceGroupName, resourceName).block(); - } - - /** - * Delete a workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Create a new workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String resourceName, WorkbookInner workbookProperties, String sourceId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workbookProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter workbookProperties is required and cannot be null.")); - } else { - workbookProperties.validate(); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - sourceId, - apiVersion, - workbookProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a new workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String resourceName, - WorkbookInner workbookProperties, - String sourceId, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workbookProperties == null) { - return Mono - .error(new IllegalArgumentException("Parameter workbookProperties is required and cannot be null.")); - } else { - workbookProperties.validate(); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - sourceId, - apiVersion, - workbookProperties, - accept, - context); - } - - /** - * Create a new workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, WorkbookInner workbookProperties, String sourceId) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create a new workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, WorkbookInner workbookProperties) { - final String sourceId = null; - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create a new workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkbookInner createOrUpdate( - String resourceGroupName, String resourceName, WorkbookInner workbookProperties) { - final String sourceId = null; - return createOrUpdateAsync(resourceGroupName, resourceName, workbookProperties, sourceId).block(); - } - - /** - * Create a new workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - WorkbookInner workbookProperties, - String sourceId, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId, context) - .block(); - } - - /** - * Updates a workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param workbookUpdateParameters Properties that need to be specified to create a new workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - String sourceId, - WorkbookUpdateParameters workbookUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workbookUpdateParameters != null) { - workbookUpdateParameters.validate(); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - sourceId, - apiVersion, - workbookUpdateParameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param workbookUpdateParameters Properties that need to be specified to create a new workbook. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - String sourceId, - WorkbookUpdateParameters workbookUpdateParameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (workbookUpdateParameters != null) { - workbookUpdateParameters.validate(); - } - final String apiVersion = "2020-10-20"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - sourceId, - apiVersion, - workbookUpdateParameters, - accept, - context); - } - - /** - * Updates a workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param workbookUpdateParameters Properties that need to be specified to create a new workbook. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String resourceName, - String sourceId, - WorkbookUpdateParameters workbookUpdateParameters) { - return updateWithResponseAsync(resourceGroupName, resourceName, sourceId, workbookUpdateParameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates a workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String resourceName) { - final String sourceId = null; - final WorkbookUpdateParameters workbookUpdateParameters = null; - return updateWithResponseAsync(resourceGroupName, resourceName, sourceId, workbookUpdateParameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates a workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkbookInner update(String resourceGroupName, String resourceName) { - final String sourceId = null; - final WorkbookUpdateParameters workbookUpdateParameters = null; - return updateAsync(resourceGroupName, resourceName, sourceId, workbookUpdateParameters).block(); - } - - /** - * Updates a workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param workbookUpdateParameters Properties that need to be specified to create a new workbook. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights workbook definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - String sourceId, - WorkbookUpdateParameters workbookUpdateParameters, - Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, sourceId, workbookUpdateParameters, context) - .block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workbook list result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnalyticsItems.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnalyticsItems.java deleted file mode 100644 index cdecd79501e82..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnalyticsItems.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAnalyticsItemInner; -import java.util.List; - -/** Resource collection API of AnalyticsItems. */ -public interface AnalyticsItems { - /** - * Gets a list of Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @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 Analytics Items defined within an Application Insights component. - */ - List list( - String resourceGroupName, String resourceName, ItemScopePath scopePath); - - /** - * Gets a list of Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param scope Enum indicating if this item definition is owned by a specific user or is shared between all users - * with access to the Application Insights component. - * @param type Enum indicating the type of the Analytics item. - * @param includeContent Flag indicating whether or not to return the content of each applicable item. If false, - * only return the item information. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Analytics Items defined within an Application Insights component. - */ - Response> listWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ItemScope scope, - ItemTypeParameter type, - Boolean includeContent, - Context context); - - /** - * Gets a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @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 specific Analytics Items defined within an Application Insights component. - */ - ApplicationInsightsComponentAnalyticsItem get( - String resourceGroupName, String resourceName, ItemScopePath scopePath); - - /** - * Gets a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param id The Id of a specific item defined in the Application Insights component. - * @param name The name of a specific item defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Analytics Items defined within an Application Insights component. - */ - Response getWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context); - - /** - * Adds or Updates a specific Analytics Item within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param itemProperties Properties that need to be specified to create a new item and add it to an Application - * Insights component. - * @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 properties that define an Analytics item that is associated to an Application Insights component. - */ - ApplicationInsightsComponentAnalyticsItem put( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties); - - /** - * Adds or Updates a specific Analytics Item within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param itemProperties Properties that need to be specified to create a new item and add it to an Application - * Insights component. - * @param overrideItem Flag indicating whether or not to force save an item. This allows overriding an item if it - * already exists. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define an Analytics item that is associated to an Application Insights component. - */ - Response putWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties, - Boolean overrideItem, - Context context); - - /** - * Deletes a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @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. - */ - void delete(String resourceGroupName, String resourceName, ItemScopePath scopePath); - - /** - * Deletes a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param id The Id of a specific item defined in the Application Insights component. - * @param name The name of a specific item defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotation.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotation.java deleted file mode 100644 index 8efb150adb4a4..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotation.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner; -import java.time.OffsetDateTime; - -/** An immutable client-side representation of Annotation. */ -public interface Annotation { - /** - * Gets the annotationName property: Name of annotation. - * - * @return the annotationName value. - */ - String annotationName(); - - /** - * Gets the category property: Category of annotation, free form. - * - * @return the category value. - */ - String category(); - - /** - * Gets the eventTime property: Time when event occurred. - * - * @return the eventTime value. - */ - OffsetDateTime eventTime(); - - /** - * Gets the id property: Unique Id for annotation. - * - * @return the id value. - */ - String id(); - - /** - * Gets the properties property: Serialized JSON object for detailed properties. - * - * @return the properties value. - */ - String properties(); - - /** - * Gets the relatedAnnotation property: Related parent annotation if any. - * - * @return the relatedAnnotation value. - */ - String relatedAnnotation(); - - /** - * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner object. - * - * @return the inner object. - */ - AnnotationInner innerModel(); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationError.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationError.java deleted file mode 100644 index 0aa0ae1bfa74d..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationError.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Error associated with trying to create annotation with Id that already exist. */ -@Immutable -public final class AnnotationError extends ManagementError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AnnotationError.class); - - /* - * Inner error - */ - @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) - private InnerError innererror; - - /** - * Get the innererror property: Inner error. - * - * @return the innererror value. - */ - public InnerError getInnererror() { - return this.innererror; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (getInnererror() != null) { - getInnererror().validate(); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationErrorException.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationErrorException.java deleted file mode 100644 index 6294f56bbc169..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationErrorException.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.HttpResponse; -import com.azure.core.management.exception.ManagementException; - -/** Exception thrown for an invalid response with AnnotationError information. */ -public final class AnnotationErrorException extends ManagementException { - /** - * Initializes a new instance of the AnnotationErrorException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - */ - public AnnotationErrorException(String message, HttpResponse response) { - super(message, response); - } - - /** - * Initializes a new instance of the AnnotationErrorException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - * @param value the deserialized response value. - */ - public AnnotationErrorException(String message, HttpResponse response, AnnotationError value) { - super(message, response, value); - } - - @Override - public AnnotationError getValue() { - return (AnnotationError) super.getValue(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotations.java deleted file mode 100644 index 64be5a65ef2fd..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotations.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner; -import java.util.List; - -/** Resource collection API of Annotations. */ -public interface Annotations { - /** - * Gets the list of annotations for a component for given time range. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param start The start time to query from for annotations, cannot be older than 90 days from current date. - * @param end The end time to query for annotations. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of annotations for a component for given time range. - */ - PagedIterable list(String resourceGroupName, String resourceName, String start, String end); - - /** - * Gets the list of annotations for a component for given time range. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param start The start time to query from for annotations, cannot be older than 90 days from current date. - * @param end The end time to query for annotations. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of annotations for a component for given time range. - */ - PagedIterable list( - String resourceGroupName, String resourceName, String start, String end, Context context); - - /** - * Create an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationProperties Properties that need to be specified to create an annotation of a Application - * Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of Annotation. - */ - List create(String resourceGroupName, String resourceName, AnnotationInner annotationProperties); - - /** - * Create an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationProperties Properties that need to be specified to create an annotation of a Application - * Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of Annotation. - */ - Response> createWithResponse( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context); - - /** - * Delete an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @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. - */ - void delete(String resourceGroupName, String resourceName, String annotationId); - - /** - * Delete an Annotation of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context); - - /** - * Get the annotation for given id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the annotation for given id. - */ - List get(String resourceGroupName, String resourceName, String annotationId); - - /** - * Get the annotation for given id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the annotation for given id. - */ - Response> getWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeyRequest.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeyRequest.java deleted file mode 100644 index 264a46861931a..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeyRequest.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** An Application Insights component API Key creation request definition. */ -@Fluent -public final class ApiKeyRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApiKeyRequest.class); - - /* - * The name of the API Key. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The read access rights of this API Key. - */ - @JsonProperty(value = "linkedReadProperties") - private List linkedReadProperties; - - /* - * The write access rights of this API Key. - */ - @JsonProperty(value = "linkedWriteProperties") - private List linkedWriteProperties; - - /** - * Get the name property: The name of the API Key. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the API Key. - * - * @param name the name value to set. - * @return the ApiKeyRequest object itself. - */ - public ApiKeyRequest withName(String name) { - this.name = name; - return this; - } - - /** - * Get the linkedReadProperties property: The read access rights of this API Key. - * - * @return the linkedReadProperties value. - */ - public List linkedReadProperties() { - return this.linkedReadProperties; - } - - /** - * Set the linkedReadProperties property: The read access rights of this API Key. - * - * @param linkedReadProperties the linkedReadProperties value to set. - * @return the ApiKeyRequest object itself. - */ - public ApiKeyRequest withLinkedReadProperties(List linkedReadProperties) { - this.linkedReadProperties = linkedReadProperties; - return this; - } - - /** - * Get the linkedWriteProperties property: The write access rights of this API Key. - * - * @return the linkedWriteProperties value. - */ - public List linkedWriteProperties() { - return this.linkedWriteProperties; - } - - /** - * Set the linkedWriteProperties property: The write access rights of this API Key. - * - * @param linkedWriteProperties the linkedWriteProperties value to set. - * @return the ApiKeyRequest object itself. - */ - public ApiKeyRequest withLinkedWriteProperties(List linkedWriteProperties) { - this.linkedWriteProperties = linkedWriteProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponent.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponent.java deleted file mode 100644 index c61f6317c9607..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponent.java +++ /dev/null @@ -1,463 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentInner; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** An immutable client-side representation of ApplicationInsightsComponent. */ -public interface ApplicationInsightsComponent { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the kind property: The kind of application that this component refers to, used to customize UI. This value - * is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. - * - * @return the kind value. - */ - String kind(); - - /** - * Gets the applicationId property: The unique ID of your application. This field mirrors the 'Name' field and - * cannot be changed. - * - * @return the applicationId value. - */ - String applicationId(); - - /** - * Gets the appId property: Application Insights Unique ID for your Application. - * - * @return the appId value. - */ - String appId(); - - /** - * Gets the applicationType property: Type of application being monitored. - * - * @return the applicationType value. - */ - ApplicationType applicationType(); - - /** - * Gets the flowType property: Used by the Application Insights system to determine what kind of flow this component - * was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. - * - * @return the flowType value. - */ - FlowType flowType(); - - /** - * Gets the requestSource property: Describes what tool created this Application Insights component. Customers using - * this API should set this to the default 'rest'. - * - * @return the requestSource value. - */ - RequestSource requestSource(); - - /** - * Gets the instrumentationKey property: Application Insights Instrumentation key. A read-only value that - * applications can use to identify the destination for all telemetry sent to Azure Application Insights. This value - * will be supplied upon construction of each new Application Insights component. - * - * @return the instrumentationKey value. - */ - String instrumentationKey(); - - /** - * Gets the creationDate property: Creation Date for the Application Insights component, in ISO 8601 format. - * - * @return the creationDate value. - */ - OffsetDateTime creationDate(); - - /** - * Gets the tenantId property: Azure Tenant Id. - * - * @return the tenantId value. - */ - String tenantId(); - - /** - * Gets the hockeyAppId property: The unique application ID created when a new application is added to HockeyApp, - * used for communications with HockeyApp. - * - * @return the hockeyAppId value. - */ - String hockeyAppId(); - - /** - * Gets the hockeyAppToken property: Token used to authenticate communications with between Application Insights and - * HockeyApp. - * - * @return the hockeyAppToken value. - */ - String hockeyAppToken(); - - /** - * Gets the provisioningState property: Current state of this component: whether or not is has been provisioned - * within the resource group it is defined. Users cannot change this value but are able to read from it. Values will - * include Succeeded, Deploying, Canceled, and Failed. - * - * @return the provisioningState value. - */ - String provisioningState(); - - /** - * Gets the samplingPercentage property: Percentage of the data produced by the application being monitored that is - * being sampled for Application Insights telemetry. - * - * @return the samplingPercentage value. - */ - Double samplingPercentage(); - - /** - * Gets the connectionString property: Application Insights component connection string. - * - * @return the connectionString value. - */ - String connectionString(); - - /** - * Gets the retentionInDays property: Retention period in days. - * - * @return the retentionInDays value. - */ - Integer retentionInDays(); - - /** - * Gets the disableIpMasking property: Disable IP masking. - * - * @return the disableIpMasking value. - */ - Boolean disableIpMasking(); - - /** - * Gets the immediatePurgeDataOn30Days property: Purge data immediately after 30 days. - * - * @return the immediatePurgeDataOn30Days value. - */ - Boolean immediatePurgeDataOn30Days(); - - /** - * Gets the privateLinkScopedResources property: List of linked private link scope resources. - * - * @return the privateLinkScopedResources value. - */ - List privateLinkScopedResources(); - - /** - * Gets the ingestionMode property: Indicates the flow of the ingestion. - * - * @return the ingestionMode value. - */ - IngestionMode ingestionMode(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentInner - * object. - * - * @return the inner object. - */ - ApplicationInsightsComponentInner innerModel(); - - /** The entirety of the ApplicationInsightsComponent definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithKind, - DefinitionStages.WithCreate { - } - /** The ApplicationInsightsComponent definition stages. */ - interface DefinitionStages { - /** The first stage of the ApplicationInsightsComponent definition. */ - interface Blank extends WithLocation { - } - /** The stage of the ApplicationInsightsComponent definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - /** The stage of the ApplicationInsightsComponent definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithKind withExistingResourceGroup(String resourceGroupName); - } - /** The stage of the ApplicationInsightsComponent definition allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: The kind of application that this component refers to, used to customize UI. - * This value is a freeform string, values should typically be one of the following: web, ios, other, store, - * java, phone.. - * - * @param kind The kind of application that this component refers to, used to customize UI. This value is a - * freeform string, values should typically be one of the following: web, ios, other, store, java, - * phone. - * @return the next definition stage. - */ - WithCreate withKind(String kind); - } - /** - * The stage of the ApplicationInsightsComponent definition which contains all the minimum required properties - * for the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithApplicationType, - DefinitionStages.WithFlowType, - DefinitionStages.WithRequestSource, - DefinitionStages.WithHockeyAppId, - DefinitionStages.WithSamplingPercentage, - DefinitionStages.WithRetentionInDays, - DefinitionStages.WithDisableIpMasking, - DefinitionStages.WithImmediatePurgeDataOn30Days, - DefinitionStages.WithIngestionMode { - /** - * Executes the create request. - * - * @return the created resource. - */ - ApplicationInsightsComponent create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ApplicationInsightsComponent create(Context context); - } - /** The stage of the ApplicationInsightsComponent definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the ApplicationInsightsComponent definition allowing to specify applicationType. */ - interface WithApplicationType { - /** - * Specifies the applicationType property: Type of application being monitored.. - * - * @param applicationType Type of application being monitored. - * @return the next definition stage. - */ - WithCreate withApplicationType(ApplicationType applicationType); - } - /** The stage of the ApplicationInsightsComponent definition allowing to specify flowType. */ - interface WithFlowType { - /** - * Specifies the flowType property: Used by the Application Insights system to determine what kind of flow - * this component was created by. This is to be set to 'Bluefield' when creating/updating a component via - * the REST API.. - * - * @param flowType Used by the Application Insights system to determine what kind of flow this component was - * created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. - * @return the next definition stage. - */ - WithCreate withFlowType(FlowType flowType); - } - /** The stage of the ApplicationInsightsComponent definition allowing to specify requestSource. */ - interface WithRequestSource { - /** - * Specifies the requestSource property: Describes what tool created this Application Insights component. - * Customers using this API should set this to the default 'rest'.. - * - * @param requestSource Describes what tool created this Application Insights component. Customers using - * this API should set this to the default 'rest'. - * @return the next definition stage. - */ - WithCreate withRequestSource(RequestSource requestSource); - } - /** The stage of the ApplicationInsightsComponent definition allowing to specify hockeyAppId. */ - interface WithHockeyAppId { - /** - * Specifies the hockeyAppId property: The unique application ID created when a new application is added to - * HockeyApp, used for communications with HockeyApp.. - * - * @param hockeyAppId The unique application ID created when a new application is added to HockeyApp, used - * for communications with HockeyApp. - * @return the next definition stage. - */ - WithCreate withHockeyAppId(String hockeyAppId); - } - /** The stage of the ApplicationInsightsComponent definition allowing to specify samplingPercentage. */ - interface WithSamplingPercentage { - /** - * Specifies the samplingPercentage property: Percentage of the data produced by the application being - * monitored that is being sampled for Application Insights telemetry.. - * - * @param samplingPercentage Percentage of the data produced by the application being monitored that is - * being sampled for Application Insights telemetry. - * @return the next definition stage. - */ - WithCreate withSamplingPercentage(Double samplingPercentage); - } - /** The stage of the ApplicationInsightsComponent definition allowing to specify retentionInDays. */ - interface WithRetentionInDays { - /** - * Specifies the retentionInDays property: Retention period in days.. - * - * @param retentionInDays Retention period in days. - * @return the next definition stage. - */ - WithCreate withRetentionInDays(Integer retentionInDays); - } - /** The stage of the ApplicationInsightsComponent definition allowing to specify disableIpMasking. */ - interface WithDisableIpMasking { - /** - * Specifies the disableIpMasking property: Disable IP masking.. - * - * @param disableIpMasking Disable IP masking. - * @return the next definition stage. - */ - WithCreate withDisableIpMasking(Boolean disableIpMasking); - } - /** The stage of the ApplicationInsightsComponent definition allowing to specify immediatePurgeDataOn30Days. */ - interface WithImmediatePurgeDataOn30Days { - /** - * Specifies the immediatePurgeDataOn30Days property: Purge data immediately after 30 days.. - * - * @param immediatePurgeDataOn30Days Purge data immediately after 30 days. - * @return the next definition stage. - */ - WithCreate withImmediatePurgeDataOn30Days(Boolean immediatePurgeDataOn30Days); - } - /** The stage of the ApplicationInsightsComponent definition allowing to specify ingestionMode. */ - interface WithIngestionMode { - /** - * Specifies the ingestionMode property: Indicates the flow of the ingestion.. - * - * @param ingestionMode Indicates the flow of the ingestion. - * @return the next definition stage. - */ - WithCreate withIngestionMode(IngestionMode ingestionMode); - } - } - /** - * Begins update for the ApplicationInsightsComponent resource. - * - * @return the stage of resource update. - */ - ApplicationInsightsComponent.Update update(); - - /** The template for ApplicationInsightsComponent update. */ - interface Update extends UpdateStages.WithTags { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ApplicationInsightsComponent apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ApplicationInsightsComponent apply(Context context); - } - /** The ApplicationInsightsComponent update stages. */ - interface UpdateStages { - /** The stage of the ApplicationInsightsComponent update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ApplicationInsightsComponent refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ApplicationInsightsComponent refresh(Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItem.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItem.java deleted file mode 100644 index 42caa9bbdc18a..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItem.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAnalyticsItemInner; - -/** An immutable client-side representation of ApplicationInsightsComponentAnalyticsItem. */ -public interface ApplicationInsightsComponentAnalyticsItem { - /** - * Gets the id property: Internally assigned unique id of the item definition. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The user-defined name of the item. - * - * @return the name value. - */ - String name(); - - /** - * Gets the content property: The content of this item. - * - * @return the content value. - */ - String content(); - - /** - * Gets the version property: This instance's version of the data model. This can change as new features are added. - * - * @return the version value. - */ - String version(); - - /** - * Gets the scope property: Enum indicating if this item definition is owned by a specific user or is shared between - * all users with access to the Application Insights component. - * - * @return the scope value. - */ - ItemScope scope(); - - /** - * Gets the type property: Enum indicating the type of the Analytics item. - * - * @return the type value. - */ - ItemType type(); - - /** - * Gets the timeCreated property: Date and time in UTC when this item was created. - * - * @return the timeCreated value. - */ - String timeCreated(); - - /** - * Gets the timeModified property: Date and time in UTC of the last modification that was made to this item. - * - * @return the timeModified value. - */ - String timeModified(); - - /** - * Gets the properties property: A set of properties that can be defined in the context of a specific item type. - * Each type may have its own properties. - * - * @return the properties value. - */ - ApplicationInsightsComponentAnalyticsItemProperties properties(); - - /** - * Gets the inner - * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAnalyticsItemInner - * object. - * - * @return the inner object. - */ - ApplicationInsightsComponentAnalyticsItemInner innerModel(); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItemProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItemProperties.java deleted file mode 100644 index 6adbde600cb6c..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItemProperties.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A set of properties that can be defined in the context of a specific item type. Each type may have its own - * properties. - */ -@Fluent -public final class ApplicationInsightsComponentAnalyticsItemProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentAnalyticsItemProperties.class); - - /* - * A function alias, used when the type of the item is Function - */ - @JsonProperty(value = "functionAlias") - private String functionAlias; - - /** - * Get the functionAlias property: A function alias, used when the type of the item is Function. - * - * @return the functionAlias value. - */ - public String functionAlias() { - return this.functionAlias; - } - - /** - * Set the functionAlias property: A function alias, used when the type of the item is Function. - * - * @param functionAlias the functionAlias value to set. - * @return the ApplicationInsightsComponentAnalyticsItemProperties object itself. - */ - public ApplicationInsightsComponentAnalyticsItemProperties withFunctionAlias(String functionAlias) { - this.functionAlias = functionAlias; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKey.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKey.java deleted file mode 100644 index a521e8d99ab4a..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKey.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentApiKeyInner; -import java.util.List; - -/** An immutable client-side representation of ApplicationInsightsComponentApiKey. */ -public interface ApplicationInsightsComponentApiKey { - /** - * Gets the id property: The unique ID of the API key inside an Application Insights component. It is auto generated - * when the API key is created. - * - * @return the id value. - */ - String id(); - - /** - * Gets the apiKey property: The API key value. It will be only return once when the API Key was created. - * - * @return the apiKey value. - */ - String apiKey(); - - /** - * Gets the createdDate property: The create date of this API key. - * - * @return the createdDate value. - */ - String createdDate(); - - /** - * Gets the name property: The name of the API key. - * - * @return the name value. - */ - String name(); - - /** - * Gets the linkedReadProperties property: The read access rights of this API Key. - * - * @return the linkedReadProperties value. - */ - List linkedReadProperties(); - - /** - * Gets the linkedWriteProperties property: The write access rights of this API Key. - * - * @return the linkedWriteProperties value. - */ - List linkedWriteProperties(); - - /** - * Gets the inner - * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentApiKeyInner object. - * - * @return the inner object. - */ - ApplicationInsightsComponentApiKeyInner innerModel(); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKeyListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKeyListResult.java deleted file mode 100644 index d7df7da518a6e..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKeyListResult.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentApiKeyInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes the list of API Keys of an Application Insights Component. */ -@Fluent -public final class ApplicationInsightsComponentApiKeyListResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentApiKeyListResult.class); - - /* - * List of API Key definitions. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the value property: List of API Key definitions. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of API Key definitions. - * - * @param value the value value to set. - * @return the ApplicationInsightsComponentApiKeyListResult object itself. - */ - public ApplicationInsightsComponentApiKeyListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model ApplicationInsightsComponentApiKeyListResult")); - } else { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAvailableFeatures.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAvailableFeatures.java deleted file mode 100644 index 5e662cd5123e9..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAvailableFeatures.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAvailableFeaturesInner; -import java.util.List; - -/** An immutable client-side representation of ApplicationInsightsComponentAvailableFeatures. */ -public interface ApplicationInsightsComponentAvailableFeatures { - /** - * Gets the result property: A list of Application Insights component feature. - * - * @return the result value. - */ - List result(); - - /** - * Gets the inner - * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAvailableFeaturesInner - * object. - * - * @return the inner object. - */ - ApplicationInsightsComponentAvailableFeaturesInner innerModel(); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentBillingFeatures.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentBillingFeatures.java deleted file mode 100644 index e544e5facd0ce..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentBillingFeatures.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner; -import java.util.List; - -/** An immutable client-side representation of ApplicationInsightsComponentBillingFeatures. */ -public interface ApplicationInsightsComponentBillingFeatures { - /** - * Gets the dataVolumeCap property: An Application Insights component daily data volume cap. - * - * @return the dataVolumeCap value. - */ - ApplicationInsightsComponentDataVolumeCap dataVolumeCap(); - - /** - * Gets the currentBillingFeatures property: Current enabled pricing plan. When the component is in the Enterprise - * plan, this will list both 'Basic' and 'Application Insights Enterprise'. - * - * @return the currentBillingFeatures value. - */ - List currentBillingFeatures(); - - /** - * Gets the inner - * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner - * object. - * - * @return the inner object. - */ - ApplicationInsightsComponentBillingFeaturesInner innerModel(); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentDataVolumeCap.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentDataVolumeCap.java deleted file mode 100644 index 76110090cfef2..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentDataVolumeCap.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** An Application Insights component daily data volume cap. */ -@Fluent -public final class ApplicationInsightsComponentDataVolumeCap { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentDataVolumeCap.class); - - /* - * Daily data volume cap in GB. - */ - @JsonProperty(value = "Cap") - private Float cap; - - /* - * Daily data volume cap UTC reset hour. - */ - @JsonProperty(value = "ResetTime", access = JsonProperty.Access.WRITE_ONLY) - private Integer resetTime; - - /* - * Reserved, not used for now. - */ - @JsonProperty(value = "WarningThreshold") - private Integer warningThreshold; - - /* - * Reserved, not used for now. - */ - @JsonProperty(value = "StopSendNotificationWhenHitThreshold") - private Boolean stopSendNotificationWhenHitThreshold; - - /* - * Do not send a notification email when the daily data volume cap is met. - */ - @JsonProperty(value = "StopSendNotificationWhenHitCap") - private Boolean stopSendNotificationWhenHitCap; - - /* - * Maximum daily data volume cap that the user can set for this component. - */ - @JsonProperty(value = "MaxHistoryCap", access = JsonProperty.Access.WRITE_ONLY) - private Float maxHistoryCap; - - /** - * Get the cap property: Daily data volume cap in GB. - * - * @return the cap value. - */ - public Float cap() { - return this.cap; - } - - /** - * Set the cap property: Daily data volume cap in GB. - * - * @param cap the cap value to set. - * @return the ApplicationInsightsComponentDataVolumeCap object itself. - */ - public ApplicationInsightsComponentDataVolumeCap withCap(Float cap) { - this.cap = cap; - return this; - } - - /** - * Get the resetTime property: Daily data volume cap UTC reset hour. - * - * @return the resetTime value. - */ - public Integer resetTime() { - return this.resetTime; - } - - /** - * Get the warningThreshold property: Reserved, not used for now. - * - * @return the warningThreshold value. - */ - public Integer warningThreshold() { - return this.warningThreshold; - } - - /** - * Set the warningThreshold property: Reserved, not used for now. - * - * @param warningThreshold the warningThreshold value to set. - * @return the ApplicationInsightsComponentDataVolumeCap object itself. - */ - public ApplicationInsightsComponentDataVolumeCap withWarningThreshold(Integer warningThreshold) { - this.warningThreshold = warningThreshold; - return this; - } - - /** - * Get the stopSendNotificationWhenHitThreshold property: Reserved, not used for now. - * - * @return the stopSendNotificationWhenHitThreshold value. - */ - public Boolean stopSendNotificationWhenHitThreshold() { - return this.stopSendNotificationWhenHitThreshold; - } - - /** - * Set the stopSendNotificationWhenHitThreshold property: Reserved, not used for now. - * - * @param stopSendNotificationWhenHitThreshold the stopSendNotificationWhenHitThreshold value to set. - * @return the ApplicationInsightsComponentDataVolumeCap object itself. - */ - public ApplicationInsightsComponentDataVolumeCap withStopSendNotificationWhenHitThreshold( - Boolean stopSendNotificationWhenHitThreshold) { - this.stopSendNotificationWhenHitThreshold = stopSendNotificationWhenHitThreshold; - return this; - } - - /** - * Get the stopSendNotificationWhenHitCap property: Do not send a notification email when the daily data volume cap - * is met. - * - * @return the stopSendNotificationWhenHitCap value. - */ - public Boolean stopSendNotificationWhenHitCap() { - return this.stopSendNotificationWhenHitCap; - } - - /** - * Set the stopSendNotificationWhenHitCap property: Do not send a notification email when the daily data volume cap - * is met. - * - * @param stopSendNotificationWhenHitCap the stopSendNotificationWhenHitCap value to set. - * @return the ApplicationInsightsComponentDataVolumeCap object itself. - */ - public ApplicationInsightsComponentDataVolumeCap withStopSendNotificationWhenHitCap( - Boolean stopSendNotificationWhenHitCap) { - this.stopSendNotificationWhenHitCap = stopSendNotificationWhenHitCap; - return this; - } - - /** - * Get the maxHistoryCap property: Maximum daily data volume cap that the user can set for this component. - * - * @return the maxHistoryCap value. - */ - public Float maxHistoryCap() { - return this.maxHistoryCap; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportConfiguration.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportConfiguration.java deleted file mode 100644 index 00887d1016ceb..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportConfiguration.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentExportConfigurationInner; - -/** An immutable client-side representation of ApplicationInsightsComponentExportConfiguration. */ -public interface ApplicationInsightsComponentExportConfiguration { - /** - * Gets the exportId property: The unique ID of the export configuration inside an Application Insights component. - * It is auto generated when the Continuous Export configuration is created. - * - * @return the exportId value. - */ - String exportId(); - - /** - * Gets the instrumentationKey property: The instrumentation key of the Application Insights component. - * - * @return the instrumentationKey value. - */ - String instrumentationKey(); - - /** - * Gets the recordTypes property: This comma separated list of document types that will be exported. The possible - * values include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', - * 'PerformanceCounters', 'Availability', 'Messages'. - * - * @return the recordTypes value. - */ - String recordTypes(); - - /** - * Gets the applicationName property: The name of the Application Insights component. - * - * @return the applicationName value. - */ - String applicationName(); - - /** - * Gets the subscriptionId property: The subscription of the Application Insights component. - * - * @return the subscriptionId value. - */ - String subscriptionId(); - - /** - * Gets the resourceGroup property: The resource group of the Application Insights component. - * - * @return the resourceGroup value. - */ - String resourceGroup(); - - /** - * Gets the destinationStorageSubscriptionId property: The destination storage account subscription ID. - * - * @return the destinationStorageSubscriptionId value. - */ - String destinationStorageSubscriptionId(); - - /** - * Gets the destinationStorageLocationId property: The destination account location ID. - * - * @return the destinationStorageLocationId value. - */ - String destinationStorageLocationId(); - - /** - * Gets the destinationAccountId property: The name of destination account. - * - * @return the destinationAccountId value. - */ - String destinationAccountId(); - - /** - * Gets the destinationType property: The destination type. - * - * @return the destinationType value. - */ - String destinationType(); - - /** - * Gets the isUserEnabled property: This will be 'true' if the Continuous Export configuration is enabled, otherwise - * it will be 'false'. - * - * @return the isUserEnabled value. - */ - String isUserEnabled(); - - /** - * Gets the lastUserUpdate property: Last time the Continuous Export configuration was updated. - * - * @return the lastUserUpdate value. - */ - String lastUserUpdate(); - - /** - * Gets the notificationQueueEnabled property: Deprecated. - * - * @return the notificationQueueEnabled value. - */ - String notificationQueueEnabled(); - - /** - * Gets the exportStatus property: This indicates current Continuous Export configuration status. The possible - * values are 'Preparing', 'Success', 'Failure'. - * - * @return the exportStatus value. - */ - String exportStatus(); - - /** - * Gets the lastSuccessTime property: The last time data was successfully delivered to the destination storage - * container for this Continuous Export configuration. - * - * @return the lastSuccessTime value. - */ - String lastSuccessTime(); - - /** - * Gets the lastGapTime property: The last time the Continuous Export configuration started failing. - * - * @return the lastGapTime value. - */ - String lastGapTime(); - - /** - * Gets the permanentErrorReason property: This is the reason the Continuous Export configuration started failing. - * It can be 'AzureStorageNotFound' or 'AzureStorageAccessDenied'. - * - * @return the permanentErrorReason value. - */ - String permanentErrorReason(); - - /** - * Gets the storageName property: The name of the destination storage account. - * - * @return the storageName value. - */ - String storageName(); - - /** - * Gets the containerName property: The name of the destination storage container. - * - * @return the containerName value. - */ - String containerName(); - - /** - * Gets the inner - * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentExportConfigurationInner - * object. - * - * @return the inner object. - */ - ApplicationInsightsComponentExportConfigurationInner innerModel(); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportRequest.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportRequest.java deleted file mode 100644 index 39dc125b92da0..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportRequest.java +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** An Application Insights component Continuous Export configuration request definition. */ -@Fluent -public final class ApplicationInsightsComponentExportRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentExportRequest.class); - - /* - * The document types to be exported, as comma separated values. Allowed - * values include 'Requests', 'Event', 'Exceptions', 'Metrics', - * 'PageViews', 'PageViewPerformance', 'Rdd', 'PerformanceCounters', - * 'Availability', 'Messages'. - */ - @JsonProperty(value = "RecordTypes") - private String recordTypes; - - /* - * The Continuous Export destination type. This has to be 'Blob'. - */ - @JsonProperty(value = "DestinationType") - private String destinationType; - - /* - * The SAS URL for the destination storage container. It must grant write - * permission. - */ - @JsonProperty(value = "DestinationAddress") - private String destinationAddress; - - /* - * Set to 'true' to create a Continuous Export configuration as enabled, - * otherwise set it to 'false'. - */ - @JsonProperty(value = "IsEnabled") - private String isEnabled; - - /* - * Deprecated - */ - @JsonProperty(value = "NotificationQueueEnabled") - private String notificationQueueEnabled; - - /* - * Deprecated - */ - @JsonProperty(value = "NotificationQueueUri") - private String notificationQueueUri; - - /* - * The subscription ID of the destination storage container. - */ - @JsonProperty(value = "DestinationStorageSubscriptionId") - private String destinationStorageSubscriptionId; - - /* - * The location ID of the destination storage container. - */ - @JsonProperty(value = "DestinationStorageLocationId") - private String destinationStorageLocationId; - - /* - * The name of destination storage account. - */ - @JsonProperty(value = "DestinationAccountId") - private String destinationAccountId; - - /** - * Get the recordTypes property: The document types to be exported, as comma separated values. Allowed values - * include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', - * 'PerformanceCounters', 'Availability', 'Messages'. - * - * @return the recordTypes value. - */ - public String recordTypes() { - return this.recordTypes; - } - - /** - * Set the recordTypes property: The document types to be exported, as comma separated values. Allowed values - * include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', - * 'PerformanceCounters', 'Availability', 'Messages'. - * - * @param recordTypes the recordTypes value to set. - * @return the ApplicationInsightsComponentExportRequest object itself. - */ - public ApplicationInsightsComponentExportRequest withRecordTypes(String recordTypes) { - this.recordTypes = recordTypes; - return this; - } - - /** - * Get the destinationType property: The Continuous Export destination type. This has to be 'Blob'. - * - * @return the destinationType value. - */ - public String destinationType() { - return this.destinationType; - } - - /** - * Set the destinationType property: The Continuous Export destination type. This has to be 'Blob'. - * - * @param destinationType the destinationType value to set. - * @return the ApplicationInsightsComponentExportRequest object itself. - */ - public ApplicationInsightsComponentExportRequest withDestinationType(String destinationType) { - this.destinationType = destinationType; - return this; - } - - /** - * Get the destinationAddress property: The SAS URL for the destination storage container. It must grant write - * permission. - * - * @return the destinationAddress value. - */ - public String destinationAddress() { - return this.destinationAddress; - } - - /** - * Set the destinationAddress property: The SAS URL for the destination storage container. It must grant write - * permission. - * - * @param destinationAddress the destinationAddress value to set. - * @return the ApplicationInsightsComponentExportRequest object itself. - */ - public ApplicationInsightsComponentExportRequest withDestinationAddress(String destinationAddress) { - this.destinationAddress = destinationAddress; - return this; - } - - /** - * Get the isEnabled property: Set to 'true' to create a Continuous Export configuration as enabled, otherwise set - * it to 'false'. - * - * @return the isEnabled value. - */ - public String isEnabled() { - return this.isEnabled; - } - - /** - * Set the isEnabled property: Set to 'true' to create a Continuous Export configuration as enabled, otherwise set - * it to 'false'. - * - * @param isEnabled the isEnabled value to set. - * @return the ApplicationInsightsComponentExportRequest object itself. - */ - public ApplicationInsightsComponentExportRequest withIsEnabled(String isEnabled) { - this.isEnabled = isEnabled; - return this; - } - - /** - * Get the notificationQueueEnabled property: Deprecated. - * - * @return the notificationQueueEnabled value. - */ - public String notificationQueueEnabled() { - return this.notificationQueueEnabled; - } - - /** - * Set the notificationQueueEnabled property: Deprecated. - * - * @param notificationQueueEnabled the notificationQueueEnabled value to set. - * @return the ApplicationInsightsComponentExportRequest object itself. - */ - public ApplicationInsightsComponentExportRequest withNotificationQueueEnabled(String notificationQueueEnabled) { - this.notificationQueueEnabled = notificationQueueEnabled; - return this; - } - - /** - * Get the notificationQueueUri property: Deprecated. - * - * @return the notificationQueueUri value. - */ - public String notificationQueueUri() { - return this.notificationQueueUri; - } - - /** - * Set the notificationQueueUri property: Deprecated. - * - * @param notificationQueueUri the notificationQueueUri value to set. - * @return the ApplicationInsightsComponentExportRequest object itself. - */ - public ApplicationInsightsComponentExportRequest withNotificationQueueUri(String notificationQueueUri) { - this.notificationQueueUri = notificationQueueUri; - return this; - } - - /** - * Get the destinationStorageSubscriptionId property: The subscription ID of the destination storage container. - * - * @return the destinationStorageSubscriptionId value. - */ - public String destinationStorageSubscriptionId() { - return this.destinationStorageSubscriptionId; - } - - /** - * Set the destinationStorageSubscriptionId property: The subscription ID of the destination storage container. - * - * @param destinationStorageSubscriptionId the destinationStorageSubscriptionId value to set. - * @return the ApplicationInsightsComponentExportRequest object itself. - */ - public ApplicationInsightsComponentExportRequest withDestinationStorageSubscriptionId( - String destinationStorageSubscriptionId) { - this.destinationStorageSubscriptionId = destinationStorageSubscriptionId; - return this; - } - - /** - * Get the destinationStorageLocationId property: The location ID of the destination storage container. - * - * @return the destinationStorageLocationId value. - */ - public String destinationStorageLocationId() { - return this.destinationStorageLocationId; - } - - /** - * Set the destinationStorageLocationId property: The location ID of the destination storage container. - * - * @param destinationStorageLocationId the destinationStorageLocationId value to set. - * @return the ApplicationInsightsComponentExportRequest object itself. - */ - public ApplicationInsightsComponentExportRequest withDestinationStorageLocationId( - String destinationStorageLocationId) { - this.destinationStorageLocationId = destinationStorageLocationId; - return this; - } - - /** - * Get the destinationAccountId property: The name of destination storage account. - * - * @return the destinationAccountId value. - */ - public String destinationAccountId() { - return this.destinationAccountId; - } - - /** - * Set the destinationAccountId property: The name of destination storage account. - * - * @param destinationAccountId the destinationAccountId value to set. - * @return the ApplicationInsightsComponentExportRequest object itself. - */ - public ApplicationInsightsComponentExportRequest withDestinationAccountId(String destinationAccountId) { - this.destinationAccountId = destinationAccountId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFavorite.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFavorite.java deleted file mode 100644 index a7762c3454d18..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFavorite.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; -import java.util.List; - -/** An immutable client-side representation of ApplicationInsightsComponentFavorite. */ -public interface ApplicationInsightsComponentFavorite { - /** - * Gets the name property: The user-defined name of the favorite. - * - * @return the name value. - */ - String name(); - - /** - * Gets the config property: Configuration of this particular favorite, which are driven by the Azure portal UX. - * Configuration data is a string containing valid JSON. - * - * @return the config value. - */ - String config(); - - /** - * Gets the version property: This instance's version of the data model. This can change as new features are added - * that can be marked favorite. Current examples include MetricsExplorer (ME) and Search. - * - * @return the version value. - */ - String version(); - - /** - * Gets the favoriteId property: Internally assigned unique id of the favorite definition. - * - * @return the favoriteId value. - */ - String favoriteId(); - - /** - * Gets the favoriteType property: Enum indicating if this favorite definition is owned by a specific user or is - * shared between all users with access to the Application Insights component. - * - * @return the favoriteType value. - */ - FavoriteType favoriteType(); - - /** - * Gets the sourceType property: The source of the favorite definition. - * - * @return the sourceType value. - */ - String sourceType(); - - /** - * Gets the timeModified property: Date and time in UTC of the last modification that was made to this favorite - * definition. - * - * @return the timeModified value. - */ - String timeModified(); - - /** - * Gets the tags property: A list of 0 or more tags that are associated with this favorite definition. - * - * @return the tags value. - */ - List tags(); - - /** - * Gets the category property: Favorite category, as defined by the user at creation time. - * - * @return the category value. - */ - String category(); - - /** - * Gets the isGeneratedFromTemplate property: Flag denoting wether or not this favorite was generated from a - * template. - * - * @return the isGeneratedFromTemplate value. - */ - Boolean isGeneratedFromTemplate(); - - /** - * Gets the userId property: Unique user id of the specific user that owns this favorite. - * - * @return the userId value. - */ - String userId(); - - /** - * Gets the inner - * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner object. - * - * @return the inner object. - */ - ApplicationInsightsComponentFavoriteInner innerModel(); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeature.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeature.java deleted file mode 100644 index aca559d6b829e..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeature.java +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** An Application Insights component daily data volume cap status. */ -@Immutable -public final class ApplicationInsightsComponentFeature { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentFeature.class); - - /* - * The pricing feature name. - */ - @JsonProperty(value = "FeatureName", access = JsonProperty.Access.WRITE_ONLY) - private String featureName; - - /* - * The meter id used for the feature. - */ - @JsonProperty(value = "MeterId", access = JsonProperty.Access.WRITE_ONLY) - private String meterId; - - /* - * The meter rate for the feature's meter. - */ - @JsonProperty(value = "MeterRateFrequency", access = JsonProperty.Access.WRITE_ONLY) - private String meterRateFrequency; - - /* - * Reserved, not used now. - */ - @JsonProperty(value = "ResouceId", access = JsonProperty.Access.WRITE_ONLY) - private String resouceId; - - /* - * Reserved, not used now. - */ - @JsonProperty(value = "IsHidden", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isHidden; - - /* - * A list of Application Insights component feature capability. - */ - @JsonProperty(value = "Capabilities", access = JsonProperty.Access.WRITE_ONLY) - private List capabilities; - - /* - * Display name of the feature. - */ - @JsonProperty(value = "Title", access = JsonProperty.Access.WRITE_ONLY) - private String title; - - /* - * Whether can apply addon feature on to it. - */ - @JsonProperty(value = "IsMainFeature", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isMainFeature; - - /* - * The add on features on main feature. - */ - @JsonProperty(value = "SupportedAddonFeatures", access = JsonProperty.Access.WRITE_ONLY) - private String supportedAddonFeatures; - - /** - * Get the featureName property: The pricing feature name. - * - * @return the featureName value. - */ - public String featureName() { - return this.featureName; - } - - /** - * Get the meterId property: The meter id used for the feature. - * - * @return the meterId value. - */ - public String meterId() { - return this.meterId; - } - - /** - * Get the meterRateFrequency property: The meter rate for the feature's meter. - * - * @return the meterRateFrequency value. - */ - public String meterRateFrequency() { - return this.meterRateFrequency; - } - - /** - * Get the resouceId property: Reserved, not used now. - * - * @return the resouceId value. - */ - public String resouceId() { - return this.resouceId; - } - - /** - * Get the isHidden property: Reserved, not used now. - * - * @return the isHidden value. - */ - public Boolean isHidden() { - return this.isHidden; - } - - /** - * Get the capabilities property: A list of Application Insights component feature capability. - * - * @return the capabilities value. - */ - public List capabilities() { - return this.capabilities; - } - - /** - * Get the title property: Display name of the feature. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Get the isMainFeature property: Whether can apply addon feature on to it. - * - * @return the isMainFeature value. - */ - public Boolean isMainFeature() { - return this.isMainFeature; - } - - /** - * Get the supportedAddonFeatures property: The add on features on main feature. - * - * @return the supportedAddonFeatures value. - */ - public String supportedAddonFeatures() { - return this.supportedAddonFeatures; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (capabilities() != null) { - capabilities().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapabilities.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapabilities.java deleted file mode 100644 index 454b92c4b9f7b..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapabilities.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFeatureCapabilitiesInner; - -/** An immutable client-side representation of ApplicationInsightsComponentFeatureCapabilities. */ -public interface ApplicationInsightsComponentFeatureCapabilities { - /** - * Gets the supportExportData property: Whether allow to use continuous export feature. - * - * @return the supportExportData value. - */ - Boolean supportExportData(); - - /** - * Gets the burstThrottlePolicy property: Reserved, not used now. - * - * @return the burstThrottlePolicy value. - */ - String burstThrottlePolicy(); - - /** - * Gets the metadataClass property: Reserved, not used now. - * - * @return the metadataClass value. - */ - String metadataClass(); - - /** - * Gets the liveStreamMetrics property: Reserved, not used now. - * - * @return the liveStreamMetrics value. - */ - Boolean liveStreamMetrics(); - - /** - * Gets the applicationMap property: Reserved, not used now. - * - * @return the applicationMap value. - */ - Boolean applicationMap(); - - /** - * Gets the workItemIntegration property: Whether allow to use work item integration feature. - * - * @return the workItemIntegration value. - */ - Boolean workItemIntegration(); - - /** - * Gets the powerBIIntegration property: Reserved, not used now. - * - * @return the powerBIIntegration value. - */ - Boolean powerBIIntegration(); - - /** - * Gets the openSchema property: Reserved, not used now. - * - * @return the openSchema value. - */ - Boolean openSchema(); - - /** - * Gets the proactiveDetection property: Reserved, not used now. - * - * @return the proactiveDetection value. - */ - Boolean proactiveDetection(); - - /** - * Gets the analyticsIntegration property: Reserved, not used now. - * - * @return the analyticsIntegration value. - */ - Boolean analyticsIntegration(); - - /** - * Gets the multipleStepWebTest property: Whether allow to use multiple steps web test feature. - * - * @return the multipleStepWebTest value. - */ - Boolean multipleStepWebTest(); - - /** - * Gets the apiAccessLevel property: Reserved, not used now. - * - * @return the apiAccessLevel value. - */ - String apiAccessLevel(); - - /** - * Gets the trackingType property: The application insights component used tracking type. - * - * @return the trackingType value. - */ - String trackingType(); - - /** - * Gets the dailyCap property: Daily data volume cap in GB. - * - * @return the dailyCap value. - */ - Float dailyCap(); - - /** - * Gets the dailyCapResetTime property: Daily data volume cap UTC reset hour. - * - * @return the dailyCapResetTime value. - */ - Float dailyCapResetTime(); - - /** - * Gets the throttleRate property: Reserved, not used now. - * - * @return the throttleRate value. - */ - Float throttleRate(); - - /** - * Gets the inner - * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFeatureCapabilitiesInner - * object. - * - * @return the inner object. - */ - ApplicationInsightsComponentFeatureCapabilitiesInner innerModel(); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapability.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapability.java deleted file mode 100644 index 84401563deb81..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapability.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** An Application Insights component feature capability. */ -@Immutable -public final class ApplicationInsightsComponentFeatureCapability { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentFeatureCapability.class); - - /* - * The name of the capability. - */ - @JsonProperty(value = "Name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * The description of the capability. - */ - @JsonProperty(value = "Description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /* - * The value of the capability. - */ - @JsonProperty(value = "Value", access = JsonProperty.Access.WRITE_ONLY) - private String value; - - /* - * The unit of the capability. - */ - @JsonProperty(value = "Unit", access = JsonProperty.Access.WRITE_ONLY) - private String unit; - - /* - * The meter used for the capability. - */ - @JsonProperty(value = "MeterId", access = JsonProperty.Access.WRITE_ONLY) - private String meterId; - - /* - * The meter rate of the meter. - */ - @JsonProperty(value = "MeterRateFrequency", access = JsonProperty.Access.WRITE_ONLY) - private String meterRateFrequency; - - /** - * Get the name property: The name of the capability. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the description property: The description of the capability. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the value property: The value of the capability. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Get the unit property: The unit of the capability. - * - * @return the unit value. - */ - public String unit() { - return this.unit; - } - - /** - * Get the meterId property: The meter used for the capability. - * - * @return the meterId value. - */ - public String meterId() { - return this.meterId; - } - - /** - * Get the meterRateFrequency property: The meter rate of the meter. - * - * @return the meterRateFrequency value. - */ - public String meterRateFrequency() { - return this.meterRateFrequency; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentListResult.java deleted file mode 100644 index 8b4550fb08a21..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentListResult.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes the list of Application Insights Resources. */ -@Fluent -public final class ApplicationInsightsComponentListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationInsightsComponentListResult.class); - - /* - * List of Application Insights component definitions. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * The URI to get the next set of Application Insights component - * definitions if too many components where returned in the result set. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: List of Application Insights component definitions. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of Application Insights component definitions. - * - * @param value the value value to set. - * @return the ApplicationInsightsComponentListResult object itself. - */ - public ApplicationInsightsComponentListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URI to get the next set of Application Insights component definitions if too many - * components where returned in the result set. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The URI to get the next set of Application Insights component definitions if too many - * components where returned in the result set. - * - * @param nextLink the nextLink value to set. - * @return the ApplicationInsightsComponentListResult object itself. - */ - public ApplicationInsightsComponentListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model ApplicationInsightsComponentListResult")); - } else { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfiguration.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfiguration.java deleted file mode 100644 index 5daa2a56571c5..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfiguration.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentProactiveDetectionConfigurationInner; -import java.util.List; - -/** An immutable client-side representation of ApplicationInsightsComponentProactiveDetectionConfiguration. */ -public interface ApplicationInsightsComponentProactiveDetectionConfiguration { - /** - * Gets the name property: The rule name. - * - * @return the name value. - */ - String name(); - - /** - * Gets the enabled property: A flag that indicates whether this rule is enabled by the user. - * - * @return the enabled value. - */ - Boolean enabled(); - - /** - * Gets the sendEmailsToSubscriptionOwners property: A flag that indicated whether notifications on this rule should - * be sent to subscription owners. - * - * @return the sendEmailsToSubscriptionOwners value. - */ - Boolean sendEmailsToSubscriptionOwners(); - - /** - * Gets the customEmails property: Custom email addresses for this rule notifications. - * - * @return the customEmails value. - */ - List customEmails(); - - /** - * Gets the lastUpdatedTime property: The last time this rule was updated. - * - * @return the lastUpdatedTime value. - */ - String lastUpdatedTime(); - - /** - * Gets the ruleDefinitions property: Static definitions of the ProactiveDetection configuration rule (same values - * for all components). - * - * @return the ruleDefinitions value. - */ - ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions ruleDefinitions(); - - /** - * Gets the inner - * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentProactiveDetectionConfigurationInner - * object. - * - * @return the inner object. - */ - ApplicationInsightsComponentProactiveDetectionConfigurationInner innerModel(); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.java deleted file mode 100644 index 018e43a910b07..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** Static definitions of the ProactiveDetection configuration rule (same values for all components). */ -@Fluent -public final class ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.class); - - /* - * The rule name - */ - @JsonProperty(value = "Name") - private String name; - - /* - * The rule name as it is displayed in UI - */ - @JsonProperty(value = "DisplayName") - private String displayName; - - /* - * The rule description - */ - @JsonProperty(value = "Description") - private String description; - - /* - * URL which displays additional info about the proactive detection rule - */ - @JsonProperty(value = "HelpUrl") - private String helpUrl; - - /* - * A flag indicating whether the rule is hidden (from the UI) - */ - @JsonProperty(value = "IsHidden") - private Boolean isHidden; - - /* - * A flag indicating whether the rule is enabled by default - */ - @JsonProperty(value = "IsEnabledByDefault") - private Boolean isEnabledByDefault; - - /* - * A flag indicating whether the rule is in preview - */ - @JsonProperty(value = "IsInPreview") - private Boolean isInPreview; - - /* - * A flag indicating whether email notifications are supported for - * detections for this rule - */ - @JsonProperty(value = "SupportsEmailNotifications") - private Boolean supportsEmailNotifications; - - /** - * Get the name property: The rule name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The rule name. - * - * @param name the name value to set. - * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. - */ - public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions withName(String name) { - this.name = name; - return this; - } - - /** - * Get the displayName property: The rule name as it is displayed in UI. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The rule name as it is displayed in UI. - * - * @param displayName the displayName value to set. - * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. - */ - public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions withDisplayName( - String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description property: The rule description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The rule description. - * - * @param description the description value to set. - * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. - */ - public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions withDescription( - String description) { - this.description = description; - return this; - } - - /** - * Get the helpUrl property: URL which displays additional info about the proactive detection rule. - * - * @return the helpUrl value. - */ - public String helpUrl() { - return this.helpUrl; - } - - /** - * Set the helpUrl property: URL which displays additional info about the proactive detection rule. - * - * @param helpUrl the helpUrl value to set. - * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. - */ - public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions withHelpUrl(String helpUrl) { - this.helpUrl = helpUrl; - return this; - } - - /** - * Get the isHidden property: A flag indicating whether the rule is hidden (from the UI). - * - * @return the isHidden value. - */ - public Boolean isHidden() { - return this.isHidden; - } - - /** - * Set the isHidden property: A flag indicating whether the rule is hidden (from the UI). - * - * @param isHidden the isHidden value to set. - * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. - */ - public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions withIsHidden(Boolean isHidden) { - this.isHidden = isHidden; - return this; - } - - /** - * Get the isEnabledByDefault property: A flag indicating whether the rule is enabled by default. - * - * @return the isEnabledByDefault value. - */ - public Boolean isEnabledByDefault() { - return this.isEnabledByDefault; - } - - /** - * Set the isEnabledByDefault property: A flag indicating whether the rule is enabled by default. - * - * @param isEnabledByDefault the isEnabledByDefault value to set. - * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. - */ - public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions withIsEnabledByDefault( - Boolean isEnabledByDefault) { - this.isEnabledByDefault = isEnabledByDefault; - return this; - } - - /** - * Get the isInPreview property: A flag indicating whether the rule is in preview. - * - * @return the isInPreview value. - */ - public Boolean isInPreview() { - return this.isInPreview; - } - - /** - * Set the isInPreview property: A flag indicating whether the rule is in preview. - * - * @param isInPreview the isInPreview value to set. - * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. - */ - public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions withIsInPreview( - Boolean isInPreview) { - this.isInPreview = isInPreview; - return this; - } - - /** - * Get the supportsEmailNotifications property: A flag indicating whether email notifications are supported for - * detections for this rule. - * - * @return the supportsEmailNotifications value. - */ - public Boolean supportsEmailNotifications() { - return this.supportsEmailNotifications; - } - - /** - * Set the supportsEmailNotifications property: A flag indicating whether email notifications are supported for - * detections for this rule. - * - * @param supportsEmailNotifications the supportsEmailNotifications value to set. - * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. - */ - public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions withSupportsEmailNotifications( - Boolean supportsEmailNotifications) { - this.supportsEmailNotifications = supportsEmailNotifications; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentQuotaStatus.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentQuotaStatus.java deleted file mode 100644 index 04aa1040504dd..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentQuotaStatus.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentQuotaStatusInner; - -/** An immutable client-side representation of ApplicationInsightsComponentQuotaStatus. */ -public interface ApplicationInsightsComponentQuotaStatus { - /** - * Gets the appId property: The Application ID for the Application Insights component. - * - * @return the appId value. - */ - String appId(); - - /** - * Gets the shouldBeThrottled property: The daily data volume cap is met, and data ingestion will be stopped. - * - * @return the shouldBeThrottled value. - */ - Boolean shouldBeThrottled(); - - /** - * Gets the expirationTime property: Date and time when the daily data volume cap will be reset, and data ingestion - * will resume. - * - * @return the expirationTime value. - */ - String expirationTime(); - - /** - * Gets the inner - * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentQuotaStatusInner object. - * - * @return the inner object. - */ - ApplicationInsightsComponentQuotaStatusInner innerModel(); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentWebTestLocation.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentWebTestLocation.java deleted file mode 100644 index 64043a7c8d8a1..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentWebTestLocation.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentWebTestLocationInner; - -/** An immutable client-side representation of ApplicationInsightsComponentWebTestLocation. */ -public interface ApplicationInsightsComponentWebTestLocation { - /** - * Gets the displayName property: The display name of the web test location. - * - * @return the displayName value. - */ - String displayName(); - - /** - * Gets the tag property: Internally defined geographic location tag. - * - * @return the tag value. - */ - String tag(); - - /** - * Gets the inner - * com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentWebTestLocationInner - * object. - * - * @return the inner object. - */ - ApplicationInsightsComponentWebTestLocationInner innerModel(); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsWebTestLocationsListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsWebTestLocationsListResult.java deleted file mode 100644 index fcc98df281d18..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsWebTestLocationsListResult.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentWebTestLocationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes the list of web test locations available to an Application Insights Component. */ -@Fluent -public final class ApplicationInsightsWebTestLocationsListResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ApplicationInsightsWebTestLocationsListResult.class); - - /* - * List of web test locations. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the value property: List of web test locations. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of web test locations. - * - * @param value the value value to set. - * @return the ApplicationInsightsWebTestLocationsListResult object itself. - */ - public ApplicationInsightsWebTestLocationsListResult withValue( - List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model ApplicationInsightsWebTestLocationsListResult")); - } else { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationType.java deleted file mode 100644 index a570db599b740..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ApplicationType. */ -public final class ApplicationType extends ExpandableStringEnum { - /** Static value web for ApplicationType. */ - public static final ApplicationType WEB = fromString("web"); - - /** Static value other for ApplicationType. */ - public static final ApplicationType OTHER = fromString("other"); - - /** - * Creates or finds a ApplicationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ApplicationType. - */ - @JsonCreator - public static ApplicationType fromString(String name) { - return fromString(name, ApplicationType.class); - } - - /** @return known ApplicationType values. */ - public static Collection values() { - return values(ApplicationType.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/CategoryType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/CategoryType.java deleted file mode 100644 index 8b87e6b86e38a..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/CategoryType.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for CategoryType. */ -public final class CategoryType extends ExpandableStringEnum { - /** Static value workbook for CategoryType. */ - public static final CategoryType WORKBOOK = fromString("workbook"); - - /** Static value TSG for CategoryType. */ - public static final CategoryType TSG = fromString("TSG"); - - /** Static value performance for CategoryType. */ - public static final CategoryType PERFORMANCE = fromString("performance"); - - /** Static value retention for CategoryType. */ - public static final CategoryType RETENTION = fromString("retention"); - - /** - * Creates or finds a CategoryType from its string representation. - * - * @param name a name to look for. - * @return the corresponding CategoryType. - */ - @JsonCreator - public static CategoryType fromString(String name) { - return fromString(name, CategoryType.class); - } - - /** @return known CategoryType values. */ - public static Collection values() { - return values(CategoryType.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentAvailableFeatures.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentAvailableFeatures.java deleted file mode 100644 index 59f40ff67776a..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentAvailableFeatures.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ComponentAvailableFeatures. */ -public interface ComponentAvailableFeatures { - /** - * Returns all available features of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component available features. - */ - ApplicationInsightsComponentAvailableFeatures get(String resourceGroupName, String resourceName); - - /** - * Returns all available features of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component available features. - */ - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentCurrentBillingFeatures.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentCurrentBillingFeatures.java deleted file mode 100644 index aee6a6b4af23c..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentCurrentBillingFeatures.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner; - -/** Resource collection API of ComponentCurrentBillingFeatures. */ -public interface ComponentCurrentBillingFeatures { - /** - * Returns current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component billing features. - */ - ApplicationInsightsComponentBillingFeatures get(String resourceGroupName, String resourceName); - - /** - * Returns current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component billing features. - */ - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Update current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param billingFeaturesProperties Properties that need to be specified to update billing features for an - * Application Insights component. - * @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 an Application Insights component billing features. - */ - ApplicationInsightsComponentBillingFeatures update( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties); - - /** - * Update current billing features for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param billingFeaturesProperties Properties that need to be specified to update billing features for an - * Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component billing features. - */ - Response updateWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, - Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentFeatureCapabilities.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentFeatureCapabilities.java deleted file mode 100644 index b83e611669f83..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentFeatureCapabilities.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ComponentFeatureCapabilities. */ -public interface ComponentFeatureCapabilities { - /** - * Returns feature capabilities of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component feature capabilities. - */ - ApplicationInsightsComponentFeatureCapabilities get(String resourceGroupName, String resourceName); - - /** - * Returns feature capabilities of the application insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component feature capabilities. - */ - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBody.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBody.java deleted file mode 100644 index d009b6668826b..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBody.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** Describes the body of a purge request for an App Insights component. */ -@Fluent -public final class ComponentPurgeBody { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ComponentPurgeBody.class); - - /* - * Table from which to purge data. - */ - @JsonProperty(value = "table", required = true) - private String table; - - /* - * The set of columns and filters (queries) to run over them to purge the - * resulting data. - */ - @JsonProperty(value = "filters", required = true) - private List filters; - - /** - * Get the table property: Table from which to purge data. - * - * @return the table value. - */ - public String table() { - return this.table; - } - - /** - * Set the table property: Table from which to purge data. - * - * @param table the table value to set. - * @return the ComponentPurgeBody object itself. - */ - public ComponentPurgeBody withTable(String table) { - this.table = table; - return this; - } - - /** - * Get the filters property: The set of columns and filters (queries) to run over them to purge the resulting data. - * - * @return the filters value. - */ - public List filters() { - return this.filters; - } - - /** - * Set the filters property: The set of columns and filters (queries) to run over them to purge the resulting data. - * - * @param filters the filters value to set. - * @return the ComponentPurgeBody object itself. - */ - public ComponentPurgeBody withFilters(List filters) { - this.filters = filters; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (table() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property table in model ComponentPurgeBody")); - } - if (filters() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property filters in model ComponentPurgeBody")); - } else { - filters().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBodyFilters.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBodyFilters.java deleted file mode 100644 index 25ae0341faf30..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBodyFilters.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** User-defined filters to return data which will be purged from the table. */ -@Fluent -public final class ComponentPurgeBodyFilters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ComponentPurgeBodyFilters.class); - - /* - * The column of the table over which the given query should run - */ - @JsonProperty(value = "column") - private String column; - - /* - * A query operator to evaluate over the provided column and value(s). - * Supported operators are ==, =~, in, in~, >, >=, <, <=, between, and have - * the same behavior as they would in a KQL query. - */ - @JsonProperty(value = "operator") - private String operator; - - /* - * the value for the operator to function over. This can be a number (e.g., - * > 100), a string (timestamp >= '2017-09-01') or array of values. - */ - @JsonProperty(value = "value") - private Object value; - - /* - * When filtering over custom dimensions, this key will be used as the name - * of the custom dimension. - */ - @JsonProperty(value = "key") - private String key; - - /** - * Get the column property: The column of the table over which the given query should run. - * - * @return the column value. - */ - public String column() { - return this.column; - } - - /** - * Set the column property: The column of the table over which the given query should run. - * - * @param column the column value to set. - * @return the ComponentPurgeBodyFilters object itself. - */ - public ComponentPurgeBodyFilters withColumn(String column) { - this.column = column; - return this; - } - - /** - * Get the operator property: A query operator to evaluate over the provided column and value(s). Supported - * operators are ==, =~, in, in~, >, >=, <, <=, between, and have the same behavior as they would in a - * KQL query. - * - * @return the operator value. - */ - public String operator() { - return this.operator; - } - - /** - * Set the operator property: A query operator to evaluate over the provided column and value(s). Supported - * operators are ==, =~, in, in~, >, >=, <, <=, between, and have the same behavior as they would in a - * KQL query. - * - * @param operator the operator value to set. - * @return the ComponentPurgeBodyFilters object itself. - */ - public ComponentPurgeBodyFilters withOperator(String operator) { - this.operator = operator; - return this; - } - - /** - * Get the value property: the value for the operator to function over. This can be a number (e.g., > 100), a - * string (timestamp >= '2017-09-01') or array of values. - * - * @return the value value. - */ - public Object value() { - return this.value; - } - - /** - * Set the value property: the value for the operator to function over. This can be a number (e.g., > 100), a - * string (timestamp >= '2017-09-01') or array of values. - * - * @param value the value value to set. - * @return the ComponentPurgeBodyFilters object itself. - */ - public ComponentPurgeBodyFilters withValue(Object value) { - this.value = value; - return this; - } - - /** - * Get the key property: When filtering over custom dimensions, this key will be used as the name of the custom - * dimension. - * - * @return the key value. - */ - public String key() { - return this.key; - } - - /** - * Set the key property: When filtering over custom dimensions, this key will be used as the name of the custom - * dimension. - * - * @param key the key value to set. - * @return the ComponentPurgeBodyFilters object itself. - */ - public ComponentPurgeBodyFilters withKey(String key) { - this.key = key; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeResponse.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeResponse.java deleted file mode 100644 index f26ee0f5a6e3a..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeResponse.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeResponseInner; - -/** An immutable client-side representation of ComponentPurgeResponse. */ -public interface ComponentPurgeResponse { - /** - * Gets the operationId property: Id to use when querying for status for a particular purge operation. - * - * @return the operationId value. - */ - String operationId(); - - /** - * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeResponseInner object. - * - * @return the inner object. - */ - ComponentPurgeResponseInner innerModel(); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeStatusResponse.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeStatusResponse.java deleted file mode 100644 index d30177d81cae8..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeStatusResponse.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeStatusResponseInner; - -/** An immutable client-side representation of ComponentPurgeStatusResponse. */ -public interface ComponentPurgeStatusResponse { - /** - * Gets the status property: Status of the operation represented by the requested Id. - * - * @return the status value. - */ - PurgeState status(); - - /** - * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.ComponentPurgeStatusResponseInner - * object. - * - * @return the inner object. - */ - ComponentPurgeStatusResponseInner innerModel(); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentQuotaStatus.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentQuotaStatus.java deleted file mode 100644 index a96472a4f0605..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentQuotaStatus.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ComponentQuotaStatus. */ -public interface ComponentQuotaStatus { - /** - * Returns daily data volume cap (quota) status for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component daily data volume cap status. - */ - ApplicationInsightsComponentQuotaStatus get(String resourceGroupName, String resourceName); - - /** - * Returns daily data volume cap (quota) status for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component daily data volume cap status. - */ - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Components.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Components.java deleted file mode 100644 index 6c42cca284140..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Components.java +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Components. */ -public interface Components { - /** - * Gets a list of all Application Insights components within a subscription. - * - * @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 all Application Insights components within a subscription. - */ - PagedIterable list(); - - /** - * Gets a list of all Application Insights components within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Application Insights components within a subscription. - */ - PagedIterable list(Context context); - - /** - * Gets a list of Application Insights components within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Application Insights components within a resource group. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Gets a list of Application Insights components within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Application Insights components within a resource group. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Deletes an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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. - */ - void deleteByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Deletes an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); - - /** - * Returns an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component definition. - */ - ApplicationInsightsComponent getByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Returns an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition. - */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Purges data in an Application Insights component by a set of user-defined filters. - * - *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch - * the execution of purge requests by sending a single command whose predicate includes all user identities that - * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param body Describes the body of a request to purge data in a single table of an Application Insights component. - * @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 response containing operationId for a specific purge action. - */ - ComponentPurgeResponse purge(String resourceGroupName, String resourceName, ComponentPurgeBody body); - - /** - * Purges data in an Application Insights component by a set of user-defined filters. - * - *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch - * the execution of purge requests by sending a single command whose predicate includes all user identities that - * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param body Describes the body of a request to purge data in a single table of an Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response containing operationId for a specific purge action. - */ - Response purgeWithResponse( - String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context); - - /** - * Get status for an ongoing purge operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. - * @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 status for an ongoing purge operation. - */ - ComponentPurgeStatusResponse getPurgeStatus(String resourceGroupName, String resourceName, String purgeId); - - /** - * Get status for an ongoing purge operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return status for an ongoing purge operation. - */ - Response getPurgeStatusWithResponse( - String resourceGroupName, String resourceName, String purgeId, Context context); - - /** - * Returns an Application Insights component. - * - * @param id the resource ID. - * @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 an Application Insights component definition. - */ - ApplicationInsightsComponent getById(String id); - - /** - * Returns an Application Insights component. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes an Application Insights component. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Deletes an Application Insights component. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ApplicationInsightsComponent resource. - * - * @param name resource name. - * @return the first stage of the new ApplicationInsightsComponent definition. - */ - ApplicationInsightsComponent.DefinitionStages.Blank define(String name); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentsResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentsResource.java deleted file mode 100644 index b868bf5e126ad..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentsResource.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.Map; - -/** An azure resource object. */ -@Immutable -public class ComponentsResource extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ComponentsResource.class); - - /** {@inheritDoc} */ - @Override - public ComponentsResource withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentsResource withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinition.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinition.java deleted file mode 100644 index af911f5bb338c..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinition.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Error response. */ -@Immutable -public final class ErrorDefinition extends ManagementError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ErrorDefinition.class); - - /* - * Internal error details. - */ - @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) - private Object innererror; - - /** - * Get the innererror property: Internal error details. - * - * @return the innererror value. - */ - public Object getInnererror() { - return this.innererror; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinitionException.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinitionException.java deleted file mode 100644 index c60c13cb3f702..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinitionException.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.HttpResponse; -import com.azure.core.management.exception.ManagementException; - -/** Exception thrown for an invalid response with ErrorDefinition information. */ -public final class ErrorDefinitionException extends ManagementException { - /** - * Initializes a new instance of the ErrorDefinitionException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - */ - public ErrorDefinitionException(String message, HttpResponse response) { - super(message, response); - } - - /** - * Initializes a new instance of the ErrorDefinitionException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - * @param value the deserialized response value. - */ - public ErrorDefinitionException(String message, HttpResponse response, ErrorDefinition value) { - super(message, response, value); - } - - @Override - public ErrorDefinition getValue() { - return (ErrorDefinition) super.getValue(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ExportConfigurations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ExportConfigurations.java deleted file mode 100644 index 4d78556b82cb7..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ExportConfigurations.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import java.util.List; - -/** Resource collection API of ExportConfigurations. */ -public interface ExportConfigurations { - /** - * Gets a list of Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 Continuous Export configuration of an Application Insights component. - */ - List list(String resourceGroupName, String resourceName); - - /** - * Gets a list of Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configuration of an Application Insights component. - */ - Response> listWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Create a Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a - * Application Insights component. - * @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 Continuous Export configurations. - */ - List create( - String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties); - - /** - * Create a Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a - * Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configurations. - */ - Response> createWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentExportRequest exportProperties, - Context context); - - /** - * Delete a Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @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 properties that define a Continuous Export configuration. - */ - ApplicationInsightsComponentExportConfiguration delete( - String resourceGroupName, String resourceName, String exportId); - - /** - * Delete a Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a Continuous Export configuration. - */ - Response deleteWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context); - - /** - * Get the Continuous Export configuration for this export id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @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 Continuous Export configuration for this export id. - */ - ApplicationInsightsComponentExportConfiguration get(String resourceGroupName, String resourceName, String exportId); - - /** - * Get the Continuous Export configuration for this export id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Continuous Export configuration for this export id. - */ - Response getWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context); - - /** - * Update the Continuous Export configuration for this export id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param exportProperties Properties that need to be specified to update the Continuous Export configuration. - * @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 properties that define a Continuous Export configuration. - */ - ApplicationInsightsComponentExportConfiguration update( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties); - - /** - * Update the Continuous Export configuration for this export id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param exportProperties Properties that need to be specified to update the Continuous Export configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a Continuous Export configuration. - */ - Response updateWithResponse( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties, - Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteSourceType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteSourceType.java deleted file mode 100644 index bdc88768bf48f..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteSourceType.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for FavoriteSourceType. */ -public final class FavoriteSourceType extends ExpandableStringEnum { - /** Static value retention for FavoriteSourceType. */ - public static final FavoriteSourceType RETENTION = fromString("retention"); - - /** Static value notebook for FavoriteSourceType. */ - public static final FavoriteSourceType NOTEBOOK = fromString("notebook"); - - /** Static value sessions for FavoriteSourceType. */ - public static final FavoriteSourceType SESSIONS = fromString("sessions"); - - /** Static value events for FavoriteSourceType. */ - public static final FavoriteSourceType EVENTS = fromString("events"); - - /** Static value userflows for FavoriteSourceType. */ - public static final FavoriteSourceType USERFLOWS = fromString("userflows"); - - /** Static value funnel for FavoriteSourceType. */ - public static final FavoriteSourceType FUNNEL = fromString("funnel"); - - /** Static value impact for FavoriteSourceType. */ - public static final FavoriteSourceType IMPACT = fromString("impact"); - - /** Static value segmentation for FavoriteSourceType. */ - public static final FavoriteSourceType SEGMENTATION = fromString("segmentation"); - - /** - * Creates or finds a FavoriteSourceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding FavoriteSourceType. - */ - @JsonCreator - public static FavoriteSourceType fromString(String name) { - return fromString(name, FavoriteSourceType.class); - } - - /** @return known FavoriteSourceType values. */ - public static Collection values() { - return values(FavoriteSourceType.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteType.java deleted file mode 100644 index 92dd85a5a095f..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteType.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for FavoriteType. */ -public enum FavoriteType { - /** Enum value shared. */ - SHARED("shared"), - - /** Enum value user. */ - USER("user"); - - /** The actual serialized value for a FavoriteType instance. */ - private final String value; - - FavoriteType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a FavoriteType instance. - * - * @param value the serialized value to parse. - * @return the parsed FavoriteType object, or null if unable to parse. - */ - @JsonCreator - public static FavoriteType fromString(String value) { - FavoriteType[] items = FavoriteType.values(); - for (FavoriteType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Favorites.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Favorites.java deleted file mode 100644 index 754c0349f60fc..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Favorites.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; -import java.util.List; - -/** Resource collection API of Favorites. */ -public interface Favorites { - /** - * Gets a list of favorites defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 favorites defined within an Application Insights component. - */ - List list(String resourceGroupName, String resourceName); - - /** - * Gets a list of favorites defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteType The type of favorite. Value can be either shared or user. - * @param sourceType Source type of favorite to return. When left out, the source type defaults to 'other' (not - * present in this enum). - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable favorite. If - * false, only return summary content for favorites. - * @param tags Tags that must be present on each favorite returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of favorites defined within an Application Insights component. - */ - Response> listWithResponse( - String resourceGroupName, - String resourceName, - FavoriteType favoriteType, - FavoriteSourceType sourceType, - Boolean canFetchContent, - List tags, - Context context); - - /** - * Get a single favorite by its FavoriteId, defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @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 single favorite by its FavoriteId, defined within an Application Insights component. - */ - ApplicationInsightsComponentFavorite get(String resourceGroupName, String resourceName, String favoriteId); - - /** - * Get a single favorite by its FavoriteId, defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single favorite by its FavoriteId, defined within an Application Insights component. - */ - Response getWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context); - - /** - * Adds a new favorites to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to create a new favorite and add it to an - * Application Insights component. - * @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 properties that define a favorite that is associated to an Application Insights component. - */ - ApplicationInsightsComponentFavorite add( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties); - - /** - * Adds a new favorites to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to create a new favorite and add it to an - * Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a favorite that is associated to an Application Insights component. - */ - Response addWithResponse( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, - Context context); - - /** - * Updates a favorite that has already been added to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to update the existing favorite. - * @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 properties that define a favorite that is associated to an Application Insights component. - */ - ApplicationInsightsComponentFavorite update( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties); - - /** - * Updates a favorite that has already been added to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to update the existing favorite. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a favorite that is associated to an Application Insights component. - */ - Response updateWithResponse( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, - Context context); - - /** - * Remove a favorite that is associated to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @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. - */ - void delete(String resourceGroupName, String resourceName, String favoriteId); - - /** - * Remove a favorite that is associated to an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FlowType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FlowType.java deleted file mode 100644 index b8afe895063b4..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FlowType.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for FlowType. */ -public final class FlowType extends ExpandableStringEnum { - /** Static value Bluefield for FlowType. */ - public static final FlowType BLUEFIELD = fromString("Bluefield"); - - /** - * Creates or finds a FlowType from its string representation. - * - * @param name a name to look for. - * @return the corresponding FlowType. - */ - @JsonCreator - public static FlowType fromString(String name) { - return fromString(name, FlowType.class); - } - - /** @return known FlowType values. */ - public static Collection values() { - return values(FlowType.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/IngestionMode.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/IngestionMode.java deleted file mode 100644 index bc0bb2a7c7fe4..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/IngestionMode.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for IngestionMode. */ -public final class IngestionMode extends ExpandableStringEnum { - /** Static value ApplicationInsights for IngestionMode. */ - public static final IngestionMode APPLICATION_INSIGHTS = fromString("ApplicationInsights"); - - /** Static value ApplicationInsightsWithDiagnosticSettings for IngestionMode. */ - public static final IngestionMode APPLICATION_INSIGHTS_WITH_DIAGNOSTIC_SETTINGS = - fromString("ApplicationInsightsWithDiagnosticSettings"); - - /** Static value LogAnalytics for IngestionMode. */ - public static final IngestionMode LOG_ANALYTICS = fromString("LogAnalytics"); - - /** - * Creates or finds a IngestionMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding IngestionMode. - */ - @JsonCreator - public static IngestionMode fromString(String name) { - return fromString(name, IngestionMode.class); - } - - /** @return known IngestionMode values. */ - public static Collection values() { - return values(IngestionMode.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/InnerError.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/InnerError.java deleted file mode 100644 index 8ff0ba29af170..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/InnerError.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Inner error. */ -@Fluent -public final class InnerError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InnerError.class); - - /* - * Provides correlation for request - */ - @JsonProperty(value = "diagnosticcontext") - private String diagnosticcontext; - - /* - * Request time - */ - @JsonProperty(value = "time") - private OffsetDateTime time; - - /** - * Get the diagnosticcontext property: Provides correlation for request. - * - * @return the diagnosticcontext value. - */ - public String diagnosticcontext() { - return this.diagnosticcontext; - } - - /** - * Set the diagnosticcontext property: Provides correlation for request. - * - * @param diagnosticcontext the diagnosticcontext value to set. - * @return the InnerError object itself. - */ - public InnerError withDiagnosticcontext(String diagnosticcontext) { - this.diagnosticcontext = diagnosticcontext; - return this; - } - - /** - * Get the time property: Request time. - * - * @return the time value. - */ - public OffsetDateTime time() { - return this.time; - } - - /** - * Set the time property: Request time. - * - * @param time the time value to set. - * @return the InnerError object itself. - */ - public InnerError withTime(OffsetDateTime time) { - this.time = time; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScope.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScope.java deleted file mode 100644 index ba7af5c66cc78..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScope.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ItemScope. */ -public final class ItemScope extends ExpandableStringEnum { - /** Static value shared for ItemScope. */ - public static final ItemScope SHARED = fromString("shared"); - - /** Static value user for ItemScope. */ - public static final ItemScope USER = fromString("user"); - - /** - * Creates or finds a ItemScope from its string representation. - * - * @param name a name to look for. - * @return the corresponding ItemScope. - */ - @JsonCreator - public static ItemScope fromString(String name) { - return fromString(name, ItemScope.class); - } - - /** @return known ItemScope values. */ - public static Collection values() { - return values(ItemScope.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScopePath.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScopePath.java deleted file mode 100644 index c26c9e911a5e8..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScopePath.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ItemScopePath. */ -public final class ItemScopePath extends ExpandableStringEnum { - /** Static value analyticsItems for ItemScopePath. */ - public static final ItemScopePath ANALYTICS_ITEMS = fromString("analyticsItems"); - - /** Static value myanalyticsItems for ItemScopePath. */ - public static final ItemScopePath MYANALYTICS_ITEMS = fromString("myanalyticsItems"); - - /** - * Creates or finds a ItemScopePath from its string representation. - * - * @param name a name to look for. - * @return the corresponding ItemScopePath. - */ - @JsonCreator - public static ItemScopePath fromString(String name) { - return fromString(name, ItemScopePath.class); - } - - /** @return known ItemScopePath values. */ - public static Collection values() { - return values(ItemScopePath.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemType.java deleted file mode 100644 index 15e0b0334845b..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemType.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ItemType. */ -public final class ItemType extends ExpandableStringEnum { - /** Static value query for ItemType. */ - public static final ItemType QUERY = fromString("query"); - - /** Static value function for ItemType. */ - public static final ItemType FUNCTION = fromString("function"); - - /** Static value folder for ItemType. */ - public static final ItemType FOLDER = fromString("folder"); - - /** Static value recent for ItemType. */ - public static final ItemType RECENT = fromString("recent"); - - /** - * Creates or finds a ItemType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ItemType. - */ - @JsonCreator - public static ItemType fromString(String name) { - return fromString(name, ItemType.class); - } - - /** @return known ItemType values. */ - public static Collection values() { - return values(ItemType.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemTypeParameter.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemTypeParameter.java deleted file mode 100644 index 18e0379a99d36..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemTypeParameter.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ItemTypeParameter. */ -public final class ItemTypeParameter extends ExpandableStringEnum { - /** Static value none for ItemTypeParameter. */ - public static final ItemTypeParameter NONE = fromString("none"); - - /** Static value query for ItemTypeParameter. */ - public static final ItemTypeParameter QUERY = fromString("query"); - - /** Static value function for ItemTypeParameter. */ - public static final ItemTypeParameter FUNCTION = fromString("function"); - - /** Static value folder for ItemTypeParameter. */ - public static final ItemTypeParameter FOLDER = fromString("folder"); - - /** Static value recent for ItemTypeParameter. */ - public static final ItemTypeParameter RECENT = fromString("recent"); - - /** - * Creates or finds a ItemTypeParameter from its string representation. - * - * @param name a name to look for. - * @return the corresponding ItemTypeParameter. - */ - @JsonCreator - public static ItemTypeParameter fromString(String name) { - return fromString(name, ItemTypeParameter.class); - } - - /** @return known ItemTypeParameter values. */ - public static Collection values() { - return values(ItemTypeParameter.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Kind.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Kind.java deleted file mode 100644 index b8c3649809be8..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Kind.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for Kind. */ -public final class Kind extends ExpandableStringEnum { - /** Static value user for Kind. */ - public static final Kind USER = fromString("user"); - - /** Static value shared for Kind. */ - public static final Kind SHARED = fromString("shared"); - - /** - * Creates or finds a Kind from its string representation. - * - * @param name a name to look for. - * @return the corresponding Kind. - */ - @JsonCreator - public static Kind fromString(String name) { - return fromString(name, Kind.class); - } - - /** @return known Kind values. */ - public static Collection values() { - return values(Kind.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedIdentity.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedIdentity.java deleted file mode 100644 index b403e8b0ac1b3..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedIdentity.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** Customer Managed Identity. */ -@Fluent -public class ManagedIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIdentity.class); - - /* - * Customer Managed Identity - */ - @JsonProperty(value = "userAssignedIdentities") - private UserAssignedIdentities userAssignedIdentities; - - /* - * The identity type. - */ - @JsonProperty(value = "type") - private ManagedIdentityType type; - - /** - * Get the userAssignedIdentities property: Customer Managed Identity. - * - * @return the userAssignedIdentities value. - */ - public UserAssignedIdentities userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: Customer Managed Identity. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the ManagedIdentity object itself. - */ - public ManagedIdentity withUserAssignedIdentities(UserAssignedIdentities userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Get the type property: The identity type. - * - * @return the type value. - */ - public ManagedIdentityType type() { - return this.type; - } - - /** - * Set the type property: The identity type. - * - * @param type the type value to set. - * @return the ManagedIdentity object itself. - */ - public ManagedIdentity withType(ManagedIdentityType type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userAssignedIdentities() != null) { - userAssignedIdentities().validate(); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedIdentityAutoGenerated.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedIdentityAutoGenerated.java deleted file mode 100644 index 203b06401a9f1..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedIdentityAutoGenerated.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** Customer Managed Identity. */ -@Fluent -public final class ManagedIdentityAutoGenerated { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIdentityAutoGenerated.class); - - /* - * Customer Managed Identity - */ - @JsonProperty(value = "userAssignedIdentities") - private UserAssignedIdentitiesAutoGenerated userAssignedIdentities; - - /* - * The identity type. - */ - @JsonProperty(value = "type") - private ManagedIdentityType type; - - /** - * Get the userAssignedIdentities property: Customer Managed Identity. - * - * @return the userAssignedIdentities value. - */ - public UserAssignedIdentitiesAutoGenerated userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: Customer Managed Identity. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the ManagedIdentityAutoGenerated object itself. - */ - public ManagedIdentityAutoGenerated withUserAssignedIdentities( - UserAssignedIdentitiesAutoGenerated userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Get the type property: The identity type. - * - * @return the type value. - */ - public ManagedIdentityType type() { - return this.type; - } - - /** - * Set the type property: The identity type. - * - * @param type the type value to set. - * @return the ManagedIdentityAutoGenerated object itself. - */ - public ManagedIdentityAutoGenerated withType(ManagedIdentityType type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userAssignedIdentities() != null) { - userAssignedIdentities().validate(); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedIdentityType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedIdentityType.java deleted file mode 100644 index f1bb018b7566a..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedIdentityType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ManagedIdentityType. */ -public final class ManagedIdentityType extends ExpandableStringEnum { - /** Static value UserAssigned for ManagedIdentityType. */ - public static final ManagedIdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** Static value None for ManagedIdentityType. */ - public static final ManagedIdentityType NONE = fromString("None"); - - /** - * Creates or finds a ManagedIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedIdentityType. - */ - @JsonCreator - public static ManagedIdentityType fromString(String name) { - return fromString(name, ManagedIdentityType.class); - } - - /** @return known ManagedIdentityType values. */ - public static Collection values() { - return values(ManagedIdentityType.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbook.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbook.java deleted file mode 100644 index 467ae1a30d363..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbook.java +++ /dev/null @@ -1,581 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner; -import java.util.List; -import java.util.Map; - -/** An immutable client-side representation of MyWorkbook. */ -public interface MyWorkbook { - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the identity property: Identity used for BYOS. - * - * @return the identity value. - */ - ManagedIdentity identity(); - - /** - * Gets the id property: Azure resource Id. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: Azure resource name. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: Azure resource type. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Resource etag. - * - * @return the etag value. - */ - Map etag(); - - /** - * Gets the kind property: The kind of workbook. Choices are user and shared. - * - * @return the kind value. - */ - Kind kind(); - - /** - * Gets the displayName property: The user-defined name of the private workbook. - * - * @return the displayName value. - */ - String displayName(); - - /** - * Gets the serializedData property: Configuration of this particular private workbook. Configuration data is a - * string containing valid JSON. - * - * @return the serializedData value. - */ - String serializedData(); - - /** - * Gets the version property: This instance's version of the data model. This can change as new features are added - * that can be marked private workbook. - * - * @return the version value. - */ - String version(); - - /** - * Gets the timeModified property: Date and time in UTC of the last modification that was made to this private - * workbook definition. - * - * @return the timeModified value. - */ - String timeModified(); - - /** - * Gets the category property: Workbook category, as defined by the user at creation time. - * - * @return the category value. - */ - String category(); - - /** - * Gets the tagsPropertiesTags property: A list of 0 or more tags that are associated with this private workbook - * definition. - * - * @return the tagsPropertiesTags value. - */ - List tagsPropertiesTags(); - - /** - * Gets the userId property: Unique user id of the specific user that owns this private workbook. - * - * @return the userId value. - */ - String userId(); - - /** - * Gets the sourceId property: Optional resourceId for a source resource. - * - * @return the sourceId value. - */ - String sourceId(); - - /** - * Gets the storageUri property: BYOS Storage Account URI. - * - * @return the storageUri value. - */ - String storageUri(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner object. - * - * @return the inner object. - */ - MyWorkbookInner innerModel(); - - /** The entirety of the MyWorkbook definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { - } - /** The MyWorkbook definition stages. */ - interface DefinitionStages { - /** The first stage of the MyWorkbook definition. */ - interface Blank extends WithLocation { - } - /** The stage of the MyWorkbook definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - /** The stage of the MyWorkbook definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - /** - * The stage of the MyWorkbook definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithName, - DefinitionStages.WithType, - DefinitionStages.WithEtag, - DefinitionStages.WithKind, - DefinitionStages.WithDisplayName, - DefinitionStages.WithSerializedData, - DefinitionStages.WithVersion, - DefinitionStages.WithCategory, - DefinitionStages.WithTagsPropertiesTags, - DefinitionStages.WithSourceId, - DefinitionStages.WithStorageUri, - DefinitionStages.WithSourceIdParameter { - /** - * Executes the create request. - * - * @return the created resource. - */ - MyWorkbook create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - MyWorkbook create(Context context); - } - /** The stage of the MyWorkbook definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the MyWorkbook definition allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Identity used for BYOS. - * - * @param identity Identity used for BYOS. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedIdentity identity); - } - /** The stage of the MyWorkbook definition allowing to specify name. */ - interface WithName { - /** - * Specifies the name property: Azure resource name. - * - * @param name Azure resource name. - * @return the next definition stage. - */ - WithCreate withName(String name); - } - /** The stage of the MyWorkbook definition allowing to specify type. */ - interface WithType { - /** - * Specifies the type property: Azure resource type. - * - * @param type Azure resource type. - * @return the next definition stage. - */ - WithCreate withType(String type); - } - /** The stage of the MyWorkbook definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Resource etag. - * - * @param etag Resource etag. - * @return the next definition stage. - */ - WithCreate withEtag(Map etag); - } - /** The stage of the MyWorkbook definition allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: The kind of workbook. Choices are user and shared.. - * - * @param kind The kind of workbook. Choices are user and shared. - * @return the next definition stage. - */ - WithCreate withKind(Kind kind); - } - /** The stage of the MyWorkbook definition allowing to specify displayName. */ - interface WithDisplayName { - /** - * Specifies the displayName property: The user-defined name of the private workbook.. - * - * @param displayName The user-defined name of the private workbook. - * @return the next definition stage. - */ - WithCreate withDisplayName(String displayName); - } - /** The stage of the MyWorkbook definition allowing to specify serializedData. */ - interface WithSerializedData { - /** - * Specifies the serializedData property: Configuration of this particular private workbook. Configuration - * data is a string containing valid JSON. - * - * @param serializedData Configuration of this particular private workbook. Configuration data is a string - * containing valid JSON. - * @return the next definition stage. - */ - WithCreate withSerializedData(String serializedData); - } - /** The stage of the MyWorkbook definition allowing to specify version. */ - interface WithVersion { - /** - * Specifies the version property: This instance's version of the data model. This can change as new - * features are added that can be marked private workbook.. - * - * @param version This instance's version of the data model. This can change as new features are added that - * can be marked private workbook. - * @return the next definition stage. - */ - WithCreate withVersion(String version); - } - /** The stage of the MyWorkbook definition allowing to specify category. */ - interface WithCategory { - /** - * Specifies the category property: Workbook category, as defined by the user at creation time.. - * - * @param category Workbook category, as defined by the user at creation time. - * @return the next definition stage. - */ - WithCreate withCategory(String category); - } - /** The stage of the MyWorkbook definition allowing to specify tagsPropertiesTags. */ - interface WithTagsPropertiesTags { - /** - * Specifies the tagsPropertiesTags property: A list of 0 or more tags that are associated with this private - * workbook definition. - * - * @param tagsPropertiesTags A list of 0 or more tags that are associated with this private workbook - * definition. - * @return the next definition stage. - */ - WithCreate withTagsPropertiesTags(List tagsPropertiesTags); - } - /** The stage of the MyWorkbook definition allowing to specify sourceId. */ - interface WithSourceId { - /** - * Specifies the sourceId property: Optional resourceId for a source resource.. - * - * @param sourceId Optional resourceId for a source resource. - * @return the next definition stage. - */ - WithCreate withSourceId(String sourceId); - } - /** The stage of the MyWorkbook definition allowing to specify storageUri. */ - interface WithStorageUri { - /** - * Specifies the storageUri property: BYOS Storage Account URI. - * - * @param storageUri BYOS Storage Account URI. - * @return the next definition stage. - */ - WithCreate withStorageUri(String storageUri); - } - /** The stage of the MyWorkbook definition allowing to specify sourceId. */ - interface WithSourceIdParameter { - /** - * Specifies the sourceId property: Azure Resource Id that will fetch all linked workbooks.. - * - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @return the next definition stage. - */ - WithCreate withSourceIdParameter(String sourceId); - } - } - /** - * Begins update for the MyWorkbook resource. - * - * @return the stage of resource update. - */ - MyWorkbook.Update update(); - - /** The template for MyWorkbook update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithIdentity, - UpdateStages.WithName, - UpdateStages.WithType, - UpdateStages.WithEtag, - UpdateStages.WithKind, - UpdateStages.WithDisplayName, - UpdateStages.WithSerializedData, - UpdateStages.WithVersion, - UpdateStages.WithCategory, - UpdateStages.WithTagsPropertiesTags, - UpdateStages.WithSourceId, - UpdateStages.WithStorageUri, - UpdateStages.WithsourceIdParameter { - /** - * Executes the update request. - * - * @return the updated resource. - */ - MyWorkbook apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - MyWorkbook apply(Context context); - } - /** The MyWorkbook update stages. */ - interface UpdateStages { - /** The stage of the MyWorkbook update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - /** The stage of the MyWorkbook update allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Identity used for BYOS. - * - * @param identity Identity used for BYOS. - * @return the next definition stage. - */ - Update withIdentity(ManagedIdentity identity); - } - /** The stage of the MyWorkbook update allowing to specify name. */ - interface WithName { - /** - * Specifies the name property: Azure resource name. - * - * @param name Azure resource name. - * @return the next definition stage. - */ - Update withName(String name); - } - /** The stage of the MyWorkbook update allowing to specify type. */ - interface WithType { - /** - * Specifies the type property: Azure resource type. - * - * @param type Azure resource type. - * @return the next definition stage. - */ - Update withType(String type); - } - /** The stage of the MyWorkbook update allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Resource etag. - * - * @param etag Resource etag. - * @return the next definition stage. - */ - Update withEtag(Map etag); - } - /** The stage of the MyWorkbook update allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: The kind of workbook. Choices are user and shared.. - * - * @param kind The kind of workbook. Choices are user and shared. - * @return the next definition stage. - */ - Update withKind(Kind kind); - } - /** The stage of the MyWorkbook update allowing to specify displayName. */ - interface WithDisplayName { - /** - * Specifies the displayName property: The user-defined name of the private workbook.. - * - * @param displayName The user-defined name of the private workbook. - * @return the next definition stage. - */ - Update withDisplayName(String displayName); - } - /** The stage of the MyWorkbook update allowing to specify serializedData. */ - interface WithSerializedData { - /** - * Specifies the serializedData property: Configuration of this particular private workbook. Configuration - * data is a string containing valid JSON. - * - * @param serializedData Configuration of this particular private workbook. Configuration data is a string - * containing valid JSON. - * @return the next definition stage. - */ - Update withSerializedData(String serializedData); - } - /** The stage of the MyWorkbook update allowing to specify version. */ - interface WithVersion { - /** - * Specifies the version property: This instance's version of the data model. This can change as new - * features are added that can be marked private workbook.. - * - * @param version This instance's version of the data model. This can change as new features are added that - * can be marked private workbook. - * @return the next definition stage. - */ - Update withVersion(String version); - } - /** The stage of the MyWorkbook update allowing to specify category. */ - interface WithCategory { - /** - * Specifies the category property: Workbook category, as defined by the user at creation time.. - * - * @param category Workbook category, as defined by the user at creation time. - * @return the next definition stage. - */ - Update withCategory(String category); - } - /** The stage of the MyWorkbook update allowing to specify tagsPropertiesTags. */ - interface WithTagsPropertiesTags { - /** - * Specifies the tagsPropertiesTags property: A list of 0 or more tags that are associated with this private - * workbook definition. - * - * @param tagsPropertiesTags A list of 0 or more tags that are associated with this private workbook - * definition. - * @return the next definition stage. - */ - Update withTagsPropertiesTags(List tagsPropertiesTags); - } - /** The stage of the MyWorkbook update allowing to specify sourceId. */ - interface WithSourceId { - /** - * Specifies the sourceId property: Optional resourceId for a source resource.. - * - * @param sourceId Optional resourceId for a source resource. - * @return the next definition stage. - */ - Update withSourceId(String sourceId); - } - /** The stage of the MyWorkbook update allowing to specify storageUri. */ - interface WithStorageUri { - /** - * Specifies the storageUri property: BYOS Storage Account URI. - * - * @param storageUri BYOS Storage Account URI. - * @return the next definition stage. - */ - Update withStorageUri(String storageUri); - } - /** The stage of the MyWorkbook update allowing to specify sourceId. */ - interface WithsourceIdParameter { - /** - * Specifies the sourceId property: Azure Resource Id that will fetch all linked workbooks.. - * - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @return the next definition stage. - */ - Update sourceIdParameter(String sourceId); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - MyWorkbook refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - MyWorkbook refresh(Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookResource.java deleted file mode 100644 index 02d62b224afd0..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookResource.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** An azure resource object. */ -@Fluent -public class MyWorkbookResource extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MyWorkbookResource.class); - - /* - * Identity used for BYOS - */ - @JsonProperty(value = "identity") - private ManagedIdentity identity; - - /* - * Azure resource Id - */ - @JsonProperty(value = "id") - private String id; - - /* - * Azure resource name - */ - @JsonProperty(value = "name") - private String name; - - /* - * Azure resource type - */ - @JsonProperty(value = "type") - private String type; - - /* - * Resource etag - */ - @JsonProperty(value = "etag") - private Map etag; - - /** - * Get the identity property: Identity used for BYOS. - * - * @return the identity value. - */ - public ManagedIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Identity used for BYOS. - * - * @param identity the identity value to set. - * @return the MyWorkbookResource object itself. - */ - public MyWorkbookResource withIdentity(ManagedIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the id property: Azure resource Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Azure resource Id. - * - * @param id the id value to set. - * @return the MyWorkbookResource object itself. - */ - public MyWorkbookResource withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Azure resource name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Azure resource name. - * - * @param name the name value to set. - * @return the MyWorkbookResource object itself. - */ - public MyWorkbookResource withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: Azure resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Azure resource type. - * - * @param type the type value to set. - * @return the MyWorkbookResource object itself. - */ - public MyWorkbookResource withType(String type) { - this.type = type; - return this; - } - - /** - * Get the etag property: Resource etag. - * - * @return the etag value. - */ - public Map etag() { - return this.etag; - } - - /** - * Set the etag property: Resource etag. - * - * @param etag the etag value to set. - * @return the MyWorkbookResource object itself. - */ - public MyWorkbookResource withEtag(Map etag) { - this.etag = etag; - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookResource withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public MyWorkbookResource withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooks.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooks.java deleted file mode 100644 index 1443a1487423e..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooks.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import java.util.List; - -/** Resource collection API of MyWorkbooks. */ -public interface MyWorkbooks { - /** - * Get all private workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified resource group and category. - */ - PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category); - - /** - * Get all private workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified resource group and category. - */ - PagedIterable listByResourceGroup( - String resourceGroupName, - CategoryType category, - List tags, - String sourceId, - Boolean canFetchContent, - Context context); - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - PagedIterable list(CategoryType category); - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - PagedIterable list(CategoryType category, List tags, Boolean canFetchContent, Context context); - - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. - */ - MyWorkbook getByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Delete a private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); - - /** - * Get a single private workbook by its resourceName. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. - */ - MyWorkbook getById(String id); - - /** - * Get a single private workbook by its resourceName. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a private workbook. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a private workbook. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new MyWorkbook resource. - * - * @param name resource name. - * @return the first stage of the new MyWorkbook definition. - */ - MyWorkbook.DefinitionStages.Blank define(String name); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooksListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooksListResult.java deleted file mode 100644 index 0f3efffaa11c9..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooksListResult.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Workbook list result. */ -@Fluent -public final class MyWorkbooksListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MyWorkbooksListResult.class); - - /* - * An array of private workbooks. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The nextLink property. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: An array of private workbooks. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The nextLink property. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The nextLink property. - * - * @param nextLink the nextLink value to set. - * @return the MyWorkbooksListResult object itself. - */ - public MyWorkbooksListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operation.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operation.java deleted file mode 100644 index 6ab1a1e945ca4..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operation.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner; - -/** An immutable client-side representation of Operation. */ -public interface Operation { - /** - * Gets the name property: Operation name: {provider}/{resource}/{operation}. - * - * @return the name value. - */ - String name(); - - /** - * Gets the display property: The object that represents the operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationDisplay.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationDisplay.java deleted file mode 100644 index eda089677310a..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationDisplay.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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 object that represents the operation. */ -@Fluent -public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - - /* - * Service provider: Microsoft.Insights - */ - @JsonProperty(value = "provider") - private String provider; - - /* - * Resource on which the operation is performed: Profile, endpoint, etc. - */ - @JsonProperty(value = "resource") - private String resource; - - /* - * Operation type: Read, write, delete, etc. - */ - @JsonProperty(value = "operation") - private String operation; - - /** - * Get the provider property: Service provider: Microsoft.Insights. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider property: Service provider: Microsoft.Insights. - * - * @param provider the provider value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource property: Resource on which the operation is performed: Profile, endpoint, etc. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource property: Resource on which the operation is performed: Profile, endpoint, etc. - * - * @param resource the resource value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation property: Operation type: Read, write, delete, etc. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation property: Operation type: Read, write, delete, etc. - * - * @param operation the operation value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationListResult.java deleted file mode 100644 index 5476588c1d5aa..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationListResult.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** - * Result of the request to list Azure Workbooks operations. It contains a list of operations and a URL link to get the - * next set of results. - */ -@Fluent -public final class OperationListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResult.class); - - /* - * List of Workbook operations supported by the Microsoft.Insights resource - * provider. - */ - @JsonProperty(value = "value") - private List value; - - /* - * URL to get the next set of operation list results if there are any. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: List of Workbook operations supported by the Microsoft.Insights resource provider. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of Workbook operations supported by the Microsoft.Insights resource provider. - * - * @param value the value value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to get the next set of operation list results if there are any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL to get the next set of operation list results if there are any. - * - * @param nextLink the nextLink value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operations.java deleted file mode 100644 index a439727d633cc..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operations.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of Operations. */ -public interface Operations { - /** - * Lists all of the available insights REST API 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 result of the request to list Azure Workbooks operations. - */ - PagedIterable list(); - - /** - * Lists all of the available insights REST API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Azure Workbooks operations. - */ - PagedIterable list(Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PrivateLinkScopedResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PrivateLinkScopedResource.java deleted file mode 100644 index bfa94992b1d74..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PrivateLinkScopedResource.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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 private link scope resource reference. */ -@Fluent -public final class PrivateLinkScopedResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkScopedResource.class); - - /* - * The full resource Id of the private link scope resource. - */ - @JsonProperty(value = "ResourceId") - private String resourceId; - - /* - * The private link scope unique Identifier. - */ - @JsonProperty(value = "ScopeId") - private String scopeId; - - /** - * Get the resourceId property: The full resource Id of the private link scope resource. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: The full resource Id of the private link scope resource. - * - * @param resourceId the resourceId value to set. - * @return the PrivateLinkScopedResource object itself. - */ - public PrivateLinkScopedResource withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the scopeId property: The private link scope unique Identifier. - * - * @return the scopeId value. - */ - public String scopeId() { - return this.scopeId; - } - - /** - * Set the scopeId property: The private link scope unique Identifier. - * - * @param scopeId the scopeId value to set. - * @return the PrivateLinkScopedResource object itself. - */ - public PrivateLinkScopedResource withScopeId(String scopeId) { - this.scopeId = scopeId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ProactiveDetectionConfigurations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ProactiveDetectionConfigurations.java deleted file mode 100644 index e7fce09319c77..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ProactiveDetectionConfigurations.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentProactiveDetectionConfigurationInner; -import java.util.List; - -/** Resource collection API of ProactiveDetectionConfigurations. */ -public interface ProactiveDetectionConfigurations { - /** - * Gets a list of ProactiveDetection configurations of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 ProactiveDetection configurations of an Application Insights component. - */ - List list( - String resourceGroupName, String resourceName); - - /** - * Gets a list of ProactiveDetection configurations of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of ProactiveDetection configurations of an Application Insights component. - */ - Response> listWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Get the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @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 ProactiveDetection configuration for this configuration id. - */ - ApplicationInsightsComponentProactiveDetectionConfiguration get( - String resourceGroupName, String resourceName, String configurationId); - - /** - * Get the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the ProactiveDetection configuration for this configuration id. - */ - Response getWithResponse( - String resourceGroupName, String resourceName, String configurationId, Context context); - - /** - * Update the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. - * @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 properties that define a ProactiveDetection configuration. - */ - ApplicationInsightsComponentProactiveDetectionConfiguration update( - String resourceGroupName, - String resourceName, - String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties); - - /** - * Update the ProactiveDetection configuration for this configuration id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights - * component. - * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection - * configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define a ProactiveDetection configuration. - */ - Response updateWithResponse( - String resourceGroupName, - String resourceName, - String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, - Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PurgeState.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PurgeState.java deleted file mode 100644 index dd2e5cad39b1b..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PurgeState.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PurgeState. */ -public final class PurgeState extends ExpandableStringEnum { - /** Static value pending for PurgeState. */ - public static final PurgeState PENDING = fromString("pending"); - - /** Static value completed for PurgeState. */ - public static final PurgeState COMPLETED = fromString("completed"); - - /** - * Creates or finds a PurgeState from its string representation. - * - * @param name a name to look for. - * @return the corresponding PurgeState. - */ - @JsonCreator - public static PurgeState fromString(String name) { - return fromString(name, PurgeState.class); - } - - /** @return known PurgeState values. */ - public static Collection values() { - return values(PurgeState.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/RequestSource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/RequestSource.java deleted file mode 100644 index 1e55a777e8557..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/RequestSource.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for RequestSource. */ -public final class RequestSource extends ExpandableStringEnum { - /** Static value rest for RequestSource. */ - public static final RequestSource REST = fromString("rest"); - - /** - * Creates or finds a RequestSource from its string representation. - * - * @param name a name to look for. - * @return the corresponding RequestSource. - */ - @JsonCreator - public static RequestSource fromString(String name) { - return fromString(name, RequestSource.class); - } - - /** @return known RequestSource values. */ - public static Collection values() { - return values(RequestSource.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/SharedTypeKind.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/SharedTypeKind.java deleted file mode 100644 index 225f7c27c8606..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/SharedTypeKind.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SharedTypeKind. */ -public final class SharedTypeKind extends ExpandableStringEnum { - /** Static value user for SharedTypeKind. */ - public static final SharedTypeKind USER = fromString("user"); - - /** Static value shared for SharedTypeKind. */ - public static final SharedTypeKind SHARED = fromString("shared"); - - /** - * Creates or finds a SharedTypeKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding SharedTypeKind. - */ - @JsonCreator - public static SharedTypeKind fromString(String name) { - return fromString(name, SharedTypeKind.class); - } - - /** @return known SharedTypeKind values. */ - public static Collection values() { - return values(SharedTypeKind.class); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/TagsResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/TagsResource.java deleted file mode 100644 index 2aee8ea3d38ad..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/TagsResource.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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.Map; - -/** A container holding only the Tags for a resource, allowing the user to update the tags on a WebTest instance. */ -@Fluent -public final class TagsResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TagsResource.class); - - /* - * Resource tags - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the TagsResource object itself. - */ - public TagsResource withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentities.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentities.java deleted file mode 100644 index 82e27e7779c6e..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentities.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** Customer Managed Identity. */ -@Immutable -public final class UserAssignedIdentities { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAssignedIdentities.class); - - /* - * The principal ID of resource identity. - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private String principalId; - - /* - * The tenant ID of resource. - */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /** - * Get the principalId property: The principal ID of resource identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of resource. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentitiesAutoGenerated.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentitiesAutoGenerated.java deleted file mode 100644 index 9ef3948e54cd2..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentitiesAutoGenerated.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** Customer Managed Identity. */ -@Immutable -public final class UserAssignedIdentitiesAutoGenerated { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAssignedIdentitiesAutoGenerated.class); - - /* - * The principal ID of resource identity. - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private String principalId; - - /* - * The tenant ID of resource. - */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /* - * The client ID of resource. - */ - @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) - private String clientId; - - /** - * Get the principalId property: The principal ID of resource identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of resource. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the clientId property: The client ID of resource. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTest.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTest.java deleted file mode 100644 index 44a1c496edf1a..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTest.java +++ /dev/null @@ -1,408 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.WebTestInner; -import java.util.List; -import java.util.Map; - -/** An immutable client-side representation of WebTest. */ -public interface WebTest { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the kind property: The kind of web test that this web test watches. Choices are ping and multistep. - * - * @return the kind value. - */ - WebTestKind kind(); - - /** - * Gets the syntheticMonitorId property: Unique ID of this WebTest. This is typically the same value as the Name - * field. - * - * @return the syntheticMonitorId value. - */ - String syntheticMonitorId(); - - /** - * Gets the webTestName property: User defined name if this WebTest. - * - * @return the webTestName value. - */ - String webTestName(); - - /** - * Gets the description property: Purpose/user defined descriptive test for this WebTest. - * - * @return the description value. - */ - String description(); - - /** - * Gets the enabled property: Is the test actively being monitored. - * - * @return the enabled value. - */ - Boolean enabled(); - - /** - * Gets the frequency property: Interval in seconds between test runs for this WebTest. Default value is 300. - * - * @return the frequency value. - */ - Integer frequency(); - - /** - * Gets the timeout property: Seconds until this WebTest will timeout and fail. Default value is 30. - * - * @return the timeout value. - */ - Integer timeout(); - - /** - * Gets the webTestKind property: The kind of web test this is, valid choices are ping and multistep. - * - * @return the webTestKind value. - */ - WebTestKind webTestKind(); - - /** - * Gets the retryEnabled property: Allow for retries should this WebTest fail. - * - * @return the retryEnabled value. - */ - Boolean retryEnabled(); - - /** - * Gets the locations property: A list of where to physically run the tests from to give global coverage for - * accessibility of your application. - * - * @return the locations value. - */ - List locations(); - - /** - * Gets the configuration property: An XML configuration specification for a WebTest. - * - * @return the configuration value. - */ - WebTestPropertiesConfiguration configuration(); - - /** - * Gets the provisioningState property: Current state of this component, whether or not is has been provisioned - * within the resource group it is defined. Users cannot change this value but are able to read from it. Values will - * include Succeeded, Deploying, Canceled, and Failed. - * - * @return the provisioningState value. - */ - String provisioningState(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.WebTestInner object. - * - * @return the inner object. - */ - WebTestInner innerModel(); - - /** The entirety of the WebTest definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { - } - /** The WebTest definition stages. */ - interface DefinitionStages { - /** The first stage of the WebTest definition. */ - interface Blank extends WithLocation { - } - /** The stage of the WebTest definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - /** The stage of the WebTest definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - /** - * The stage of the WebTest definition which contains all the minimum required properties for the resource to be - * created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithKind, - DefinitionStages.WithSyntheticMonitorId, - DefinitionStages.WithWebTestName, - DefinitionStages.WithDescription, - DefinitionStages.WithEnabled, - DefinitionStages.WithFrequency, - DefinitionStages.WithTimeout, - DefinitionStages.WithWebTestKind, - DefinitionStages.WithRetryEnabled, - DefinitionStages.WithLocations, - DefinitionStages.WithConfiguration { - /** - * Executes the create request. - * - * @return the created resource. - */ - WebTest create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - WebTest create(Context context); - } - /** The stage of the WebTest definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the WebTest definition allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: The kind of web test that this web test watches. Choices are ping and - * multistep.. - * - * @param kind The kind of web test that this web test watches. Choices are ping and multistep. - * @return the next definition stage. - */ - WithCreate withKind(WebTestKind kind); - } - /** The stage of the WebTest definition allowing to specify syntheticMonitorId. */ - interface WithSyntheticMonitorId { - /** - * Specifies the syntheticMonitorId property: Unique ID of this WebTest. This is typically the same value as - * the Name field.. - * - * @param syntheticMonitorId Unique ID of this WebTest. This is typically the same value as the Name field. - * @return the next definition stage. - */ - WithCreate withSyntheticMonitorId(String syntheticMonitorId); - } - /** The stage of the WebTest definition allowing to specify webTestName. */ - interface WithWebTestName { - /** - * Specifies the webTestName property: User defined name if this WebTest.. - * - * @param webTestName User defined name if this WebTest. - * @return the next definition stage. - */ - WithCreate withWebTestName(String webTestName); - } - /** The stage of the WebTest definition allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: Purpose/user defined descriptive test for this WebTest.. - * - * @param description Purpose/user defined descriptive test for this WebTest. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - /** The stage of the WebTest definition allowing to specify enabled. */ - interface WithEnabled { - /** - * Specifies the enabled property: Is the test actively being monitored.. - * - * @param enabled Is the test actively being monitored. - * @return the next definition stage. - */ - WithCreate withEnabled(Boolean enabled); - } - /** The stage of the WebTest definition allowing to specify frequency. */ - interface WithFrequency { - /** - * Specifies the frequency property: Interval in seconds between test runs for this WebTest. Default value - * is 300.. - * - * @param frequency Interval in seconds between test runs for this WebTest. Default value is 300. - * @return the next definition stage. - */ - WithCreate withFrequency(Integer frequency); - } - /** The stage of the WebTest definition allowing to specify timeout. */ - interface WithTimeout { - /** - * Specifies the timeout property: Seconds until this WebTest will timeout and fail. Default value is 30.. - * - * @param timeout Seconds until this WebTest will timeout and fail. Default value is 30. - * @return the next definition stage. - */ - WithCreate withTimeout(Integer timeout); - } - /** The stage of the WebTest definition allowing to specify webTestKind. */ - interface WithWebTestKind { - /** - * Specifies the webTestKind property: The kind of web test this is, valid choices are ping and multistep.. - * - * @param webTestKind The kind of web test this is, valid choices are ping and multistep. - * @return the next definition stage. - */ - WithCreate withWebTestKind(WebTestKind webTestKind); - } - /** The stage of the WebTest definition allowing to specify retryEnabled. */ - interface WithRetryEnabled { - /** - * Specifies the retryEnabled property: Allow for retries should this WebTest fail.. - * - * @param retryEnabled Allow for retries should this WebTest fail. - * @return the next definition stage. - */ - WithCreate withRetryEnabled(Boolean retryEnabled); - } - /** The stage of the WebTest definition allowing to specify locations. */ - interface WithLocations { - /** - * Specifies the locations property: A list of where to physically run the tests from to give global - * coverage for accessibility of your application.. - * - * @param locations A list of where to physically run the tests from to give global coverage for - * accessibility of your application. - * @return the next definition stage. - */ - WithCreate withLocations(List locations); - } - /** The stage of the WebTest definition allowing to specify configuration. */ - interface WithConfiguration { - /** - * Specifies the configuration property: An XML configuration specification for a WebTest.. - * - * @param configuration An XML configuration specification for a WebTest. - * @return the next definition stage. - */ - WithCreate withConfiguration(WebTestPropertiesConfiguration configuration); - } - } - /** - * Begins update for the WebTest resource. - * - * @return the stage of resource update. - */ - WebTest.Update update(); - - /** The template for WebTest update. */ - interface Update extends UpdateStages.WithTags { - /** - * Executes the update request. - * - * @return the updated resource. - */ - WebTest apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - WebTest apply(Context context); - } - /** The WebTest update stages. */ - interface UpdateStages { - /** The stage of the WebTest update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - WebTest refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - WebTest refresh(Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestGeolocation.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestGeolocation.java deleted file mode 100644 index da11d5c494e47..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestGeolocation.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** Geo-physical location to run a web test from. You must specify one or more locations for the test to run from. */ -@Fluent -public final class WebTestGeolocation { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebTestGeolocation.class); - - /* - * Location ID for the webtest to run from. - */ - @JsonProperty(value = "Id") - private String location; - - /** - * Get the location property: Location ID for the webtest to run from. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Location ID for the webtest to run from. - * - * @param location the location value to set. - * @return the WebTestGeolocation object itself. - */ - public WebTestGeolocation withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestKind.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestKind.java deleted file mode 100644 index 863583cd95cfe..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestKind.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for WebTestKind. */ -public enum WebTestKind { - /** Enum value ping. */ - PING("ping"), - - /** Enum value multistep. */ - MULTISTEP("multistep"); - - /** The actual serialized value for a WebTestKind instance. */ - private final String value; - - WebTestKind(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a WebTestKind instance. - * - * @param value the serialized value to parse. - * @return the parsed WebTestKind object, or null if unable to parse. - */ - @JsonCreator - public static WebTestKind fromString(String value) { - WebTestKind[] items = WebTestKind.values(); - for (WebTestKind item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestListResult.java deleted file mode 100644 index f55af8a78cf27..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestListResult.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.models.WebTestInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of 0 or more Application Insights web test definitions. */ -@Fluent -public final class WebTestListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebTestListResult.class); - - /* - * Set of Application Insights web test definitions. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * The link to get the next part of the returned list of web tests, should - * the return set be too large for a single request. May be null. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: Set of Application Insights web test definitions. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Set of Application Insights web test definitions. - * - * @param value the value value to set. - * @return the WebTestListResult object itself. - */ - public WebTestListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to get the next part of the returned list of web tests, should the return set - * be too large for a single request. May be null. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to get the next part of the returned list of web tests, should the return set - * be too large for a single request. May be null. - * - * @param nextLink the nextLink value to set. - * @return the WebTestListResult object itself. - */ - public WebTestListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model WebTestListResult")); - } else { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestLocations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestLocations.java deleted file mode 100644 index c26f0c33790a9..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestLocations.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of WebTestLocations. */ -public interface WebTestLocations { - /** - * Gets a list of web test locations available to this Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 web test locations available to this Application Insights component. - */ - PagedIterable list(String resourceGroupName, String resourceName); - - /** - * Gets a list of web test locations available to this Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of web test locations available to this Application Insights component. - */ - PagedIterable list( - String resourceGroupName, String resourceName, Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesConfiguration.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesConfiguration.java deleted file mode 100644 index ab03f9880d4b2..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesConfiguration.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** An XML configuration specification for a WebTest. */ -@Fluent -public final class WebTestPropertiesConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebTestPropertiesConfiguration.class); - - /* - * The XML specification of a WebTest to run against an application. - */ - @JsonProperty(value = "WebTest") - private String webTest; - - /** - * Get the webTest property: The XML specification of a WebTest to run against an application. - * - * @return the webTest value. - */ - public String webTest() { - return this.webTest; - } - - /** - * Set the webTest property: The XML specification of a WebTest to run against an application. - * - * @param webTest the webTest value to set. - * @return the WebTestPropertiesConfiguration object itself. - */ - public WebTestPropertiesConfiguration withWebTest(String webTest) { - this.webTest = webTest; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTests.java deleted file mode 100644 index 7e956cc96474d..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTests.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of WebTests. */ -public interface WebTests { - /** - * Get all Application Insights web tests defined within a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Application Insights web tests defined within a specified resource group. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get all Application Insights web tests defined within a specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined within a specified resource group. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get a specific Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @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 specific Application Insights web test definition. - */ - WebTest getByResourceGroup(String resourceGroupName, String webTestName); - - /** - * Get a specific Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Application Insights web test definition. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String webTestName, Context context); - - /** - * Deletes an Application Insights web test. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @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. - */ - void deleteByResourceGroup(String resourceGroupName, String webTestName); - - /** - * Deletes an Application Insights web test. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteWithResponse(String resourceGroupName, String webTestName, Context context); - - /** - * Get all Application Insights web test alerts definitions within a subscription. - * - * @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 Application Insights web test alerts definitions within a subscription. - */ - PagedIterable list(); - - /** - * Get all Application Insights web test alerts definitions within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web test alerts definitions within a subscription. - */ - PagedIterable list(Context context); - - /** - * Get all Application Insights web tests defined for the specified component. - * - * @param componentName The name of the Application Insights component resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Application Insights web tests defined for the specified component. - */ - PagedIterable listByComponent(String componentName, String resourceGroupName); - - /** - * Get all Application Insights web tests defined for the specified component. - * - * @param componentName The name of the Application Insights component resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined for the specified component. - */ - PagedIterable listByComponent(String componentName, String resourceGroupName, Context context); - - /** - * Get a specific Application Insights web test definition. - * - * @param id the resource ID. - * @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 specific Application Insights web test definition. - */ - WebTest getById(String id); - - /** - * Get a specific Application Insights web test definition. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Application Insights web test definition. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes an Application Insights web test. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Deletes an Application Insights web test. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new WebTest resource. - * - * @param name resource name. - * @return the first stage of the new WebTest definition. - */ - WebTest.DefinitionStages.Blank define(String name); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfiguration.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfiguration.java deleted file mode 100644 index 45989045bfc7f..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfiguration.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.resourcemanager.applicationinsights.fluent.models.WorkItemConfigurationInner; - -/** An immutable client-side representation of WorkItemConfiguration. */ -public interface WorkItemConfiguration { - /** - * Gets the connectorId property: Connector identifier where work item is created. - * - * @return the connectorId value. - */ - String connectorId(); - - /** - * Gets the configDisplayName property: Configuration friendly name. - * - * @return the configDisplayName value. - */ - String configDisplayName(); - - /** - * Gets the isDefault property: Boolean value indicating whether configuration is default. - * - * @return the isDefault value. - */ - Boolean isDefault(); - - /** - * Gets the id property: Unique Id for work item. - * - * @return the id value. - */ - String id(); - - /** - * Gets the configProperties property: Serialized JSON object for detailed properties. - * - * @return the configProperties value. - */ - String configProperties(); - - /** - * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.WorkItemConfigurationInner object. - * - * @return the inner object. - */ - WorkItemConfigurationInner innerModel(); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationError.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationError.java deleted file mode 100644 index 1959b6eb009b8..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationError.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Error associated with trying to get work item configuration or configurations. */ -@Immutable -public final class WorkItemConfigurationError extends ManagementError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkItemConfigurationError.class); - - /* - * Inner error - */ - @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) - private InnerError innererror; - - /** - * Get the innererror property: Inner error. - * - * @return the innererror value. - */ - public InnerError getInnererror() { - return this.innererror; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (getInnererror() != null) { - getInnererror().validate(); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationErrorException.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationErrorException.java deleted file mode 100644 index 1c2921df0c7f1..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationErrorException.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.HttpResponse; -import com.azure.core.management.exception.ManagementException; - -/** Exception thrown for an invalid response with WorkItemConfigurationError information. */ -public final class WorkItemConfigurationErrorException extends ManagementException { - /** - * Initializes a new instance of the WorkItemConfigurationErrorException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - */ - public WorkItemConfigurationErrorException(String message, HttpResponse response) { - super(message, response); - } - - /** - * Initializes a new instance of the WorkItemConfigurationErrorException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - * @param value the deserialized response value. - */ - public WorkItemConfigurationErrorException( - String message, HttpResponse response, WorkItemConfigurationError value) { - super(message, response, value); - } - - @Override - public WorkItemConfigurationError getValue() { - return (WorkItemConfigurationError) super.getValue(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurations.java deleted file mode 100644 index a08fd9774c98d..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurations.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of WorkItemConfigurations. */ -public interface WorkItemConfigurations { - /** - * Gets the list work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurationErrorException thrown if the - * request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list work item configurations that exist for the application. - */ - PagedIterable list(String resourceGroupName, String resourceName); - - /** - * Gets the list work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkItemConfigurationErrorException thrown if the - * request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list work item configurations that exist for the application. - */ - PagedIterable list(String resourceGroupName, String resourceName, Context context); - - /** - * Create a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. - * @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 work item configuration associated with an application insights resource. - */ - WorkItemConfiguration create( - String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties); - - /** - * Create a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return work item configuration associated with an application insights resource. - */ - Response createWithResponse( - String resourceGroupName, - String resourceName, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context); - - /** - * Gets default work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @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 default work item configurations that exist for the application. - */ - WorkItemConfiguration getDefault(String resourceGroupName, String resourceName); - - /** - * Gets default work item configurations that exist for the application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return default work item configurations that exist for the application. - */ - Response getDefaultWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Delete a work item configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @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. - */ - void delete(String resourceGroupName, String resourceName, String workItemConfigId); - - /** - * Delete a work item configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context); - - /** - * Gets specified work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @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 specified work item configuration for an Application Insights component. - */ - WorkItemConfiguration getItem(String resourceGroupName, String resourceName, String workItemConfigId); - - /** - * Gets specified work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specified work item configuration for an Application Insights component. - */ - Response getItemWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context); - - /** - * Update a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. - * @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 work item configuration associated with an application insights resource. - */ - WorkItemConfiguration updateItem( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties); - - /** - * Update a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. - * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration - * for this Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return work item configuration associated with an application insights resource. - */ - Response updateItemWithResponse( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationsListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationsListResult.java deleted file mode 100644 index 132dd68f9dd6c..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationsListResult.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.models.WorkItemConfigurationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Work item configuration list result. */ -@Immutable -public final class WorkItemConfigurationsListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkItemConfigurationsListResult.class); - - /* - * An array of work item configurations. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /** - * Get the value property: An array of work item configurations. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemCreateConfiguration.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemCreateConfiguration.java deleted file mode 100644 index 1ef9072962b16..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemCreateConfiguration.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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.Map; - -/** Work item configuration creation payload. */ -@Fluent -public final class WorkItemCreateConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkItemCreateConfiguration.class); - - /* - * Unique connector id - */ - @JsonProperty(value = "ConnectorId") - private String connectorId; - - /* - * Serialized JSON object for detailed properties - */ - @JsonProperty(value = "ConnectorDataConfiguration") - private String connectorDataConfiguration; - - /* - * Boolean indicating validate only - */ - @JsonProperty(value = "ValidateOnly") - private Boolean validateOnly; - - /* - * Custom work item properties - */ - @JsonProperty(value = "WorkItemProperties") - private Map workItemProperties; - - /** - * Get the connectorId property: Unique connector id. - * - * @return the connectorId value. - */ - public String connectorId() { - return this.connectorId; - } - - /** - * Set the connectorId property: Unique connector id. - * - * @param connectorId the connectorId value to set. - * @return the WorkItemCreateConfiguration object itself. - */ - public WorkItemCreateConfiguration withConnectorId(String connectorId) { - this.connectorId = connectorId; - return this; - } - - /** - * Get the connectorDataConfiguration property: Serialized JSON object for detailed properties. - * - * @return the connectorDataConfiguration value. - */ - public String connectorDataConfiguration() { - return this.connectorDataConfiguration; - } - - /** - * Set the connectorDataConfiguration property: Serialized JSON object for detailed properties. - * - * @param connectorDataConfiguration the connectorDataConfiguration value to set. - * @return the WorkItemCreateConfiguration object itself. - */ - public WorkItemCreateConfiguration withConnectorDataConfiguration(String connectorDataConfiguration) { - this.connectorDataConfiguration = connectorDataConfiguration; - return this; - } - - /** - * Get the validateOnly property: Boolean indicating validate only. - * - * @return the validateOnly value. - */ - public Boolean validateOnly() { - return this.validateOnly; - } - - /** - * Set the validateOnly property: Boolean indicating validate only. - * - * @param validateOnly the validateOnly value to set. - * @return the WorkItemCreateConfiguration object itself. - */ - public WorkItemCreateConfiguration withValidateOnly(Boolean validateOnly) { - this.validateOnly = validateOnly; - return this; - } - - /** - * Get the workItemProperties property: Custom work item properties. - * - * @return the workItemProperties value. - */ - public Map workItemProperties() { - return this.workItemProperties; - } - - /** - * Set the workItemProperties property: Custom work item properties. - * - * @param workItemProperties the workItemProperties value to set. - * @return the WorkItemCreateConfiguration object itself. - */ - public WorkItemCreateConfiguration withWorkItemProperties(Map workItemProperties) { - this.workItemProperties = workItemProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbook.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbook.java deleted file mode 100644 index f14d90736b93c..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbook.java +++ /dev/null @@ -1,496 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookInner; -import java.util.List; -import java.util.Map; - -/** An immutable client-side representation of Workbook. */ -public interface Workbook { - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the kind property: The kind of workbook. Choices are user and shared. - * - * @return the kind value. - */ - Kind kind(); - - /** - * Gets the displayName property: The user-defined name (display name) of the workbook. - * - * @return the displayName value. - */ - String displayName(); - - /** - * Gets the serializedData property: Configuration of this particular workbook. Configuration data is a string - * containing valid JSON. - * - * @return the serializedData value. - */ - String serializedData(); - - /** - * Gets the version property: Workbook version. - * - * @return the version value. - */ - String version(); - - /** - * Gets the timeModified property: Date and time in UTC of the last modification that was made to this workbook - * definition. - * - * @return the timeModified value. - */ - String timeModified(); - - /** - * Gets the category property: Workbook category, as defined by the user at creation time. - * - * @return the category value. - */ - String category(); - - /** - * Gets the tagsPropertiesTags property: A list of 0 or more tags that are associated with this workbook definition. - * - * @return the tagsPropertiesTags value. - */ - List tagsPropertiesTags(); - - /** - * Gets the userId property: Unique user id of the specific user that owns this workbook. - * - * @return the userId value. - */ - String userId(); - - /** - * Gets the sourceId property: ResourceId for a source resource. - * - * @return the sourceId value. - */ - String sourceId(); - - /** - * Gets the storageUri property: BYOS Storage Account URI. - * - * @return the storageUri value. - */ - String storageUri(); - - /** - * Gets the identity property: Identity used for BYOS. - * - * @return the identity value. - */ - ManagedIdentityAutoGenerated identity(); - - /** - * Gets the etag property: Resource etag. - * - * @return the etag value. - */ - Map etag(); - - /** - * Gets the id property: Azure resource Id. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: Azure resource name. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: Azure resource type. - * - * @return the type value. - */ - String type(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookInner object. - * - * @return the inner object. - */ - WorkbookInner innerModel(); - - /** The entirety of the Workbook definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { - } - /** The Workbook definition stages. */ - interface DefinitionStages { - /** The first stage of the Workbook definition. */ - interface Blank extends WithLocation { - } - /** The stage of the Workbook definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - /** The stage of the Workbook definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - /** - * The stage of the Workbook definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithKind, - DefinitionStages.WithDisplayName, - DefinitionStages.WithSerializedData, - DefinitionStages.WithVersion, - DefinitionStages.WithCategory, - DefinitionStages.WithTagsPropertiesTags, - DefinitionStages.WithSourceId, - DefinitionStages.WithStorageUri, - DefinitionStages.WithIdentity, - DefinitionStages.WithEtag, - DefinitionStages.WithName, - DefinitionStages.WithType, - DefinitionStages.WithSourceIdParameter { - /** - * Executes the create request. - * - * @return the created resource. - */ - Workbook create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Workbook create(Context context); - } - /** The stage of the Workbook definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the Workbook definition allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: The kind of workbook. Choices are user and shared.. - * - * @param kind The kind of workbook. Choices are user and shared. - * @return the next definition stage. - */ - WithCreate withKind(Kind kind); - } - /** The stage of the Workbook definition allowing to specify displayName. */ - interface WithDisplayName { - /** - * Specifies the displayName property: The user-defined name (display name) of the workbook.. - * - * @param displayName The user-defined name (display name) of the workbook. - * @return the next definition stage. - */ - WithCreate withDisplayName(String displayName); - } - /** The stage of the Workbook definition allowing to specify serializedData. */ - interface WithSerializedData { - /** - * Specifies the serializedData property: Configuration of this particular workbook. Configuration data is a - * string containing valid JSON. - * - * @param serializedData Configuration of this particular workbook. Configuration data is a string - * containing valid JSON. - * @return the next definition stage. - */ - WithCreate withSerializedData(String serializedData); - } - /** The stage of the Workbook definition allowing to specify version. */ - interface WithVersion { - /** - * Specifies the version property: Workbook version. - * - * @param version Workbook version. - * @return the next definition stage. - */ - WithCreate withVersion(String version); - } - /** The stage of the Workbook definition allowing to specify category. */ - interface WithCategory { - /** - * Specifies the category property: Workbook category, as defined by the user at creation time.. - * - * @param category Workbook category, as defined by the user at creation time. - * @return the next definition stage. - */ - WithCreate withCategory(String category); - } - /** The stage of the Workbook definition allowing to specify tagsPropertiesTags. */ - interface WithTagsPropertiesTags { - /** - * Specifies the tagsPropertiesTags property: A list of 0 or more tags that are associated with this - * workbook definition. - * - * @param tagsPropertiesTags A list of 0 or more tags that are associated with this workbook definition. - * @return the next definition stage. - */ - WithCreate withTagsPropertiesTags(List tagsPropertiesTags); - } - /** The stage of the Workbook definition allowing to specify sourceId. */ - interface WithSourceId { - /** - * Specifies the sourceId property: ResourceId for a source resource.. - * - * @param sourceId ResourceId for a source resource. - * @return the next definition stage. - */ - WithCreate withSourceId(String sourceId); - } - /** The stage of the Workbook definition allowing to specify storageUri. */ - interface WithStorageUri { - /** - * Specifies the storageUri property: BYOS Storage Account URI. - * - * @param storageUri BYOS Storage Account URI. - * @return the next definition stage. - */ - WithCreate withStorageUri(String storageUri); - } - /** The stage of the Workbook definition allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Identity used for BYOS. - * - * @param identity Identity used for BYOS. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedIdentityAutoGenerated identity); - } - /** The stage of the Workbook definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Resource etag. - * - * @param etag Resource etag. - * @return the next definition stage. - */ - WithCreate withEtag(Map etag); - } - /** The stage of the Workbook definition allowing to specify name. */ - interface WithName { - /** - * Specifies the name property: Azure resource name. - * - * @param name Azure resource name. - * @return the next definition stage. - */ - WithCreate withName(String name); - } - /** The stage of the Workbook definition allowing to specify type. */ - interface WithType { - /** - * Specifies the type property: Azure resource type. - * - * @param type Azure resource type. - * @return the next definition stage. - */ - WithCreate withType(String type); - } - /** The stage of the Workbook definition allowing to specify sourceId. */ - interface WithSourceIdParameter { - /** - * Specifies the sourceId property: Azure Resource Id that will fetch all linked workbooks.. - * - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @return the next definition stage. - */ - WithCreate withSourceIdParameter(String sourceId); - } - } - /** - * Begins update for the Workbook resource. - * - * @return the stage of resource update. - */ - Workbook.Update update(); - - /** The template for Workbook update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithKind, - UpdateStages.WithDisplayName, - UpdateStages.WithSerializedData, - UpdateStages.WithCategory, - UpdateStages.WithTagsPropertiesTags, - UpdateStages.WithsourceId { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Workbook apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Workbook apply(Context context); - } - /** The Workbook update stages. */ - interface UpdateStages { - /** The stage of the Workbook update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - /** The stage of the Workbook update allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: The kind of workbook. Choices are user and shared.. - * - * @param kind The kind of workbook. Choices are user and shared. - * @return the next definition stage. - */ - Update withKind(SharedTypeKind kind); - } - /** The stage of the Workbook update allowing to specify displayName. */ - interface WithDisplayName { - /** - * Specifies the displayName property: The user-defined name (display name) of the workbook.. - * - * @param displayName The user-defined name (display name) of the workbook. - * @return the next definition stage. - */ - Update withDisplayName(String displayName); - } - /** The stage of the Workbook update allowing to specify serializedData. */ - interface WithSerializedData { - /** - * Specifies the serializedData property: Configuration of this particular workbook. Configuration data is a - * string containing valid JSON. - * - * @param serializedData Configuration of this particular workbook. Configuration data is a string - * containing valid JSON. - * @return the next definition stage. - */ - Update withSerializedData(String serializedData); - } - /** The stage of the Workbook update allowing to specify category. */ - interface WithCategory { - /** - * Specifies the category property: Workbook category, as defined by the user at creation time.. - * - * @param category Workbook category, as defined by the user at creation time. - * @return the next definition stage. - */ - Update withCategory(String category); - } - /** The stage of the Workbook update allowing to specify tagsPropertiesTags. */ - interface WithTagsPropertiesTags { - /** - * Specifies the tagsPropertiesTags property: A list of 0 or more tags that are associated with this - * workbook definition. - * - * @param tagsPropertiesTags A list of 0 or more tags that are associated with this workbook definition. - * @return the next definition stage. - */ - Update withTagsPropertiesTags(List tagsPropertiesTags); - } - /** The stage of the Workbook update allowing to specify sourceId. */ - interface WithsourceId { - /** - * Specifies the sourceId property: Azure Resource Id that will fetch all linked workbooks.. - * - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @return the next definition stage. - */ - Update sourceId(String sourceId); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Workbook refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Workbook refresh(Context context); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookError.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookError.java deleted file mode 100644 index e8b1f09d928a6..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookError.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.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; - -/** Error response. */ -@Fluent -public final class WorkbookError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbookError.class); - - /* - * The error details. - */ - @JsonProperty(value = "error") - private ErrorDefinition error; - - /** - * Get the error property: The error details. - * - * @return the error value. - */ - public ErrorDefinition error() { - return this.error; - } - - /** - * Set the error property: The error details. - * - * @param error the error value to set. - * @return the WorkbookError object itself. - */ - public WorkbookError withError(ErrorDefinition error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (error() != null) { - error().validate(); - } - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorException.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorException.java deleted file mode 100644 index c4451f91ad985..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorException.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.exception.HttpResponseException; -import com.azure.core.http.HttpResponse; - -/** Exception thrown for an invalid response with WorkbookError information. */ -public final class WorkbookErrorException extends HttpResponseException { - /** - * Initializes a new instance of the WorkbookErrorException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - */ - public WorkbookErrorException(String message, HttpResponse response) { - super(message, response); - } - - /** - * Initializes a new instance of the WorkbookErrorException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - * @param value the deserialized response value. - */ - public WorkbookErrorException(String message, HttpResponse response, WorkbookError value) { - super(message, response, value); - } - - @Override - public WorkbookError getValue() { - return (WorkbookError) super.getValue(); - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplate.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplate.java new file mode 100644 index 0000000000000..05e94ffdf1232 --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplate.java @@ -0,0 +1,350 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.models; + +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of WorkbookTemplate. */ +public interface WorkbookTemplate { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the priority property: Priority of the template. Determines which template to open when a workbook gallery + * is opened in viewer mode. + * + * @return the priority value. + */ + Integer priority(); + + /** + * Gets the author property: Information about the author of the workbook template. + * + * @return the author value. + */ + String author(); + + /** + * Gets the templateData property: Valid JSON object containing workbook template payload. + * + * @return the templateData value. + */ + Object templateData(); + + /** + * Gets the galleries property: Workbook galleries supported by the template. + * + * @return the galleries value. + */ + List galleries(); + + /** + * Gets the localized property: Key value pair of localized gallery. Each key is the locale code of languages + * supported by the Azure portal. + * + * @return the localized value. + */ + Map> localized(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the inner com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner object. + * + * @return the inner object. + */ + WorkbookTemplateInner innerModel(); + + /** The entirety of the WorkbookTemplate definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The WorkbookTemplate definition stages. */ + interface DefinitionStages { + /** The first stage of the WorkbookTemplate definition. */ + interface Blank extends WithLocation { + } + /** The stage of the WorkbookTemplate definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + /** The stage of the WorkbookTemplate definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the WorkbookTemplate definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithPriority, + DefinitionStages.WithAuthor, + DefinitionStages.WithTemplateData, + DefinitionStages.WithGalleries, + DefinitionStages.WithLocalized { + /** + * Executes the create request. + * + * @return the created resource. + */ + WorkbookTemplate create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + WorkbookTemplate create(Context context); + } + /** The stage of the WorkbookTemplate definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the WorkbookTemplate definition allowing to specify priority. */ + interface WithPriority { + /** + * Specifies the priority property: Priority of the template. Determines which template to open when a + * workbook gallery is opened in viewer mode.. + * + * @param priority Priority of the template. Determines which template to open when a workbook gallery is + * opened in viewer mode. + * @return the next definition stage. + */ + WithCreate withPriority(Integer priority); + } + /** The stage of the WorkbookTemplate definition allowing to specify author. */ + interface WithAuthor { + /** + * Specifies the author property: Information about the author of the workbook template.. + * + * @param author Information about the author of the workbook template. + * @return the next definition stage. + */ + WithCreate withAuthor(String author); + } + /** The stage of the WorkbookTemplate definition allowing to specify templateData. */ + interface WithTemplateData { + /** + * Specifies the templateData property: Valid JSON object containing workbook template payload.. + * + * @param templateData Valid JSON object containing workbook template payload. + * @return the next definition stage. + */ + WithCreate withTemplateData(Object templateData); + } + /** The stage of the WorkbookTemplate definition allowing to specify galleries. */ + interface WithGalleries { + /** + * Specifies the galleries property: Workbook galleries supported by the template.. + * + * @param galleries Workbook galleries supported by the template. + * @return the next definition stage. + */ + WithCreate withGalleries(List galleries); + } + /** The stage of the WorkbookTemplate definition allowing to specify localized. */ + interface WithLocalized { + /** + * Specifies the localized property: Key value pair of localized gallery. Each key is the locale code of + * languages supported by the Azure portal.. + * + * @param localized Key value pair of localized gallery. Each key is the locale code of languages supported + * by the Azure portal. + * @return the next definition stage. + */ + WithCreate withLocalized(Map> localized); + } + } + /** + * Begins update for the WorkbookTemplate resource. + * + * @return the stage of resource update. + */ + WorkbookTemplate.Update update(); + + /** The template for WorkbookTemplate update. */ + interface Update + extends UpdateStages.WithTags, + UpdateStages.WithPriority, + UpdateStages.WithAuthor, + UpdateStages.WithTemplateData, + UpdateStages.WithGalleries, + UpdateStages.WithLocalized { + /** + * Executes the update request. + * + * @return the updated resource. + */ + WorkbookTemplate apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + WorkbookTemplate apply(Context context); + } + /** The WorkbookTemplate update stages. */ + interface UpdateStages { + /** The stage of the WorkbookTemplate update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** The stage of the WorkbookTemplate update allowing to specify priority. */ + interface WithPriority { + /** + * Specifies the priority property: Priority of the template. Determines which template to open when a + * workbook gallery is opened in viewer mode.. + * + * @param priority Priority of the template. Determines which template to open when a workbook gallery is + * opened in viewer mode. + * @return the next definition stage. + */ + Update withPriority(Integer priority); + } + /** The stage of the WorkbookTemplate update allowing to specify author. */ + interface WithAuthor { + /** + * Specifies the author property: Information about the author of the workbook template.. + * + * @param author Information about the author of the workbook template. + * @return the next definition stage. + */ + Update withAuthor(String author); + } + /** The stage of the WorkbookTemplate update allowing to specify templateData. */ + interface WithTemplateData { + /** + * Specifies the templateData property: Valid JSON object containing workbook template payload.. + * + * @param templateData Valid JSON object containing workbook template payload. + * @return the next definition stage. + */ + Update withTemplateData(Object templateData); + } + /** The stage of the WorkbookTemplate update allowing to specify galleries. */ + interface WithGalleries { + /** + * Specifies the galleries property: Workbook galleries supported by the template.. + * + * @param galleries Workbook galleries supported by the template. + * @return the next definition stage. + */ + Update withGalleries(List galleries); + } + /** The stage of the WorkbookTemplate update allowing to specify localized. */ + interface WithLocalized { + /** + * Specifies the localized property: Key value pair of localized gallery. Each key is the locale code of + * languages supported by the Azure portal.. + * + * @param localized Key value pair of localized gallery. Each key is the locale code of languages supported + * by the Azure portal. + * @return the next definition stage. + */ + Update withLocalized(Map> localized); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + WorkbookTemplate refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + WorkbookTemplate refresh(Context context); +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateGallery.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateGallery.java new file mode 100644 index 0000000000000..55b32da56f79a --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateGallery.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.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; + +/** Gallery information for a workbook template. */ +@Fluent +public final class WorkbookTemplateGallery { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbookTemplateGallery.class); + + /* + * Name of the workbook template in the gallery. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Category for the gallery. + */ + @JsonProperty(value = "category") + private String category; + + /* + * Type of workbook supported by the workbook template. + */ + @JsonProperty(value = "type") + private String type; + + /* + * Order of the template within the gallery. + */ + @JsonProperty(value = "order") + private Integer order; + + /* + * Azure resource type supported by the gallery. + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /** + * Get the name property: Name of the workbook template in the gallery. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the workbook template in the gallery. + * + * @param name the name value to set. + * @return the WorkbookTemplateGallery object itself. + */ + public WorkbookTemplateGallery withName(String name) { + this.name = name; + return this; + } + + /** + * Get the category property: Category for the gallery. + * + * @return the category value. + */ + public String category() { + return this.category; + } + + /** + * Set the category property: Category for the gallery. + * + * @param category the category value to set. + * @return the WorkbookTemplateGallery object itself. + */ + public WorkbookTemplateGallery withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get the type property: Type of workbook supported by the workbook template. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Type of workbook supported by the workbook template. + * + * @param type the type value to set. + * @return the WorkbookTemplateGallery object itself. + */ + public WorkbookTemplateGallery withType(String type) { + this.type = type; + return this; + } + + /** + * Get the order property: Order of the template within the gallery. + * + * @return the order value. + */ + public Integer order() { + return this.order; + } + + /** + * Set the order property: Order of the template within the gallery. + * + * @param order the order value to set. + * @return the WorkbookTemplateGallery object itself. + */ + public WorkbookTemplateGallery withOrder(Integer order) { + this.order = order; + return this; + } + + /** + * Get the resourceType property: Azure resource type supported by the gallery. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resourceType property: Azure resource type supported by the gallery. + * + * @param resourceType the resourceType value to set. + * @return the WorkbookTemplateGallery object itself. + */ + public WorkbookTemplateGallery withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateLocalizedGallery.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateLocalizedGallery.java new file mode 100644 index 0000000000000..a1aa011d864c4 --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateLocalizedGallery.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.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; + +/** Localized template data and gallery information. */ +@Fluent +public final class WorkbookTemplateLocalizedGallery { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbookTemplateLocalizedGallery.class); + + /* + * Valid JSON object containing workbook template payload. + */ + @JsonProperty(value = "templateData") + private Object templateData; + + /* + * Workbook galleries supported by the template. + */ + @JsonProperty(value = "galleries") + private List galleries; + + /** + * Get the templateData property: Valid JSON object containing workbook template payload. + * + * @return the templateData value. + */ + public Object templateData() { + return this.templateData; + } + + /** + * Set the templateData property: Valid JSON object containing workbook template payload. + * + * @param templateData the templateData value to set. + * @return the WorkbookTemplateLocalizedGallery object itself. + */ + public WorkbookTemplateLocalizedGallery withTemplateData(Object templateData) { + this.templateData = templateData; + return this; + } + + /** + * Get the galleries property: Workbook galleries supported by the template. + * + * @return the galleries value. + */ + public List galleries() { + return this.galleries; + } + + /** + * Set the galleries property: Workbook galleries supported by the template. + * + * @param galleries the galleries value to set. + * @return the WorkbookTemplateLocalizedGallery object itself. + */ + public WorkbookTemplateLocalizedGallery withGalleries(List galleries) { + this.galleries = galleries; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (galleries() != null) { + galleries().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebtestsResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateResource.java similarity index 79% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebtestsResource.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateResource.java index 1c3102c9c9a5b..536e996f746bd 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebtestsResource.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateResource.java @@ -12,19 +12,19 @@ /** An azure resource object. */ @Immutable -public class WebtestsResource extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebtestsResource.class); +public class WorkbookTemplateResource extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbookTemplateResource.class); /** {@inheritDoc} */ @Override - public WebtestsResource withLocation(String location) { + public WorkbookTemplateResource withLocation(String location) { super.withLocation(location); return this; } /** {@inheritDoc} */ @Override - public WebtestsResource withTags(Map tags) { + public WorkbookTemplateResource withTags(Map tags) { super.withTags(tags); return this; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateUpdateParameters.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateUpdateParameters.java new file mode 100644 index 0000000000000..a6f6486296dda --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateUpdateParameters.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** The parameters that can be provided when updating workbook template. */ +@JsonFlatten +@Fluent +public class WorkbookTemplateUpdateParameters { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbookTemplateUpdateParameters.class); + + /* + * Resource tags + */ + @JsonProperty(value = "tags") + private Map tags; + + /* + * Priority of the template. Determines which template to open when a + * workbook gallery is opened in viewer mode. + */ + @JsonProperty(value = "properties.priority") + private Integer priority; + + /* + * Information about the author of the workbook template. + */ + @JsonProperty(value = "properties.author") + private String author; + + /* + * Valid JSON object containing workbook template payload. + */ + @JsonProperty(value = "properties.templateData") + private Object templateData; + + /* + * Workbook galleries supported by the template. + */ + @JsonProperty(value = "properties.galleries") + private List galleries; + + /* + * Key value pair of localized gallery. Each key is the locale code of + * languages supported by the Azure portal. + */ + @JsonProperty(value = "properties.localized") + private Map> localized; + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the WorkbookTemplateUpdateParameters object itself. + */ + public WorkbookTemplateUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the priority property: Priority of the template. Determines which template to open when a workbook gallery is + * opened in viewer mode. + * + * @return the priority value. + */ + public Integer priority() { + return this.priority; + } + + /** + * Set the priority property: Priority of the template. Determines which template to open when a workbook gallery is + * opened in viewer mode. + * + * @param priority the priority value to set. + * @return the WorkbookTemplateUpdateParameters object itself. + */ + public WorkbookTemplateUpdateParameters withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get the author property: Information about the author of the workbook template. + * + * @return the author value. + */ + public String author() { + return this.author; + } + + /** + * Set the author property: Information about the author of the workbook template. + * + * @param author the author value to set. + * @return the WorkbookTemplateUpdateParameters object itself. + */ + public WorkbookTemplateUpdateParameters withAuthor(String author) { + this.author = author; + return this; + } + + /** + * Get the templateData property: Valid JSON object containing workbook template payload. + * + * @return the templateData value. + */ + public Object templateData() { + return this.templateData; + } + + /** + * Set the templateData property: Valid JSON object containing workbook template payload. + * + * @param templateData the templateData value to set. + * @return the WorkbookTemplateUpdateParameters object itself. + */ + public WorkbookTemplateUpdateParameters withTemplateData(Object templateData) { + this.templateData = templateData; + return this; + } + + /** + * Get the galleries property: Workbook galleries supported by the template. + * + * @return the galleries value. + */ + public List galleries() { + return this.galleries; + } + + /** + * Set the galleries property: Workbook galleries supported by the template. + * + * @param galleries the galleries value to set. + * @return the WorkbookTemplateUpdateParameters object itself. + */ + public WorkbookTemplateUpdateParameters withGalleries(List galleries) { + this.galleries = galleries; + return this; + } + + /** + * Get the localized property: Key value pair of localized gallery. Each key is the locale code of languages + * supported by the Azure portal. + * + * @return the localized value. + */ + public Map> localized() { + return this.localized; + } + + /** + * Set the localized property: Key value pair of localized gallery. Each key is the locale code of languages + * supported by the Azure portal. + * + * @param localized the localized value to set. + * @return the WorkbookTemplateUpdateParameters object itself. + */ + public WorkbookTemplateUpdateParameters withLocalized( + Map> localized) { + this.localized = localized; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (galleries() != null) { + galleries().forEach(e -> e.validate()); + } + if (localized() != null) { + localized() + .values() + .forEach( + e -> { + if (e != null) { + e.forEach(e1 -> e1.validate()); + } + }); + } + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeys.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplates.java similarity index 56% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeys.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplates.java index a458664bda64a..60a016aa34b5e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeys.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplates.java @@ -8,118 +8,131 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ApiKeys. */ -public interface ApiKeys { +/** Resource collection API of WorkbookTemplates. */ +public interface WorkbookTemplates { /** - * Gets a list of API keys of an Application Insights component. + * Get all Workbook templates defined within a specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. * @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 API keys of an Application Insights component. + * @return all Workbook templates defined within a specified resource group. */ - PagedIterable list(String resourceGroupName, String resourceName); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets a list of API keys of an Application Insights component. + * Get all Workbook templates defined within a specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of API keys of an Application Insights component. + * @return all Workbook templates defined within a specified resource group. */ - PagedIterable list( - String resourceGroupName, String resourceName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Create an API Key of an Application Insights component. + * Get a single workbook template by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights - * component. * @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 properties that define an API key of an Application Insights Component. + * @return a single workbook template by its resourceName. */ - ApplicationInsightsComponentApiKey create( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties); + WorkbookTemplate getByResourceGroup(String resourceGroupName, String resourceName); /** - * Create an API Key of an Application Insights component. + * Get a single workbook template by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights - * component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define an API key of an Application Insights Component. + * @return a single workbook template by its resourceName. */ - Response createWithResponse( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context); + Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context); /** - * Delete an API Key of an Application Insights component. + * Delete a workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. * @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 properties that define an API key of an Application Insights Component. */ - ApplicationInsightsComponentApiKey delete(String resourceGroupName, String resourceName, String keyId); + void deleteByResourceGroup(String resourceGroupName, String resourceName); /** - * Delete an API Key of an Application Insights component. + * Delete a workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties that define an API key of an Application Insights Component. + * @return the response. */ - Response deleteWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); /** - * Get the API Key for this key id. + * Get a single workbook template by its resourceName. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. + * @param id the resource ID. * @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 API Key for this key id. + * @return a single workbook template by its resourceName. */ - ApplicationInsightsComponentApiKey get(String resourceGroupName, String resourceName, String keyId); + WorkbookTemplate getById(String id); /** - * Get the API Key for this key id. + * Get a single workbook template by its resourceName. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param keyId The API Key ID. This is unique within a Application Insights component. + * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the API Key for this key id. + * @return a single workbook template by its resourceName. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a workbook template. + * + * @param id the resource ID. + * @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. + */ + void deleteById(String id); + + /** + * Delete a workbook template. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new WorkbookTemplate resource. + * + * @param name resource name. + * @return the first stage of the new WorkbookTemplate definition. */ - Response getWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context); + WorkbookTemplate.DefinitionStages.Blank define(String name); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationsListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplatesListResult.java similarity index 53% rename from sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationsListResult.java rename to sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplatesListResult.java index 9b9fd05514b3f..fdec9792b89b3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationsListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplatesListResult.java @@ -4,33 +4,44 @@ package com.azure.resourcemanager.applicationinsights.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner; +import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookTemplateInner; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Annotations list result. */ -@Immutable -public final class AnnotationsListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AnnotationsListResult.class); +/** WorkbookTemplate list result. */ +@Fluent +public final class WorkbookTemplatesListResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbookTemplatesListResult.class); /* - * An array of annotations. + * An array of workbook templates. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; + @JsonProperty(value = "value") + private List value; /** - * Get the value property: An array of annotations. + * Get the value property: An array of workbook templates. * * @return the value value. */ - public List value() { + public List value() { return this.value; } + /** + * Set the value property: An array of workbook templates. + * + * @param value the value value to set. + * @return the WorkbookTemplatesListResult object itself. + */ + public WorkbookTemplatesListResult withValue(List value) { + this.value = value; + return this; + } + /** * Validates the instance. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateParameters.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateParameters.java deleted file mode 100644 index 3200915b3a988..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateParameters.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** The parameters that can be provided when updating workbook properties properties. */ -@JsonFlatten -@Fluent -public class WorkbookUpdateParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbookUpdateParameters.class); - - /* - * The kind of workbook. Choices are user and shared. - */ - @JsonProperty(value = "kind") - private SharedTypeKind kind; - - /* - * Resource tags - */ - @JsonProperty(value = "tags") - private Map tags; - - /* - * The user-defined name (display name) of the workbook. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /* - * Configuration of this particular workbook. Configuration data is a - * string containing valid JSON - */ - @JsonProperty(value = "properties.serializedData") - private String serializedData; - - /* - * Workbook category, as defined by the user at creation time. - */ - @JsonProperty(value = "properties.category") - private String category; - - /* - * A list of 0 or more tags that are associated with this workbook - * definition - */ - @JsonProperty(value = "properties.tags") - private List tagsPropertiesTags; - - /** - * Get the kind property: The kind of workbook. Choices are user and shared. - * - * @return the kind value. - */ - public SharedTypeKind kind() { - return this.kind; - } - - /** - * Set the kind property: The kind of workbook. Choices are user and shared. - * - * @param kind the kind value to set. - * @return the WorkbookUpdateParameters object itself. - */ - public WorkbookUpdateParameters withKind(SharedTypeKind kind) { - this.kind = kind; - return this; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the WorkbookUpdateParameters object itself. - */ - public WorkbookUpdateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the displayName property: The user-defined name (display name) of the workbook. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The user-defined name (display name) of the workbook. - * - * @param displayName the displayName value to set. - * @return the WorkbookUpdateParameters object itself. - */ - public WorkbookUpdateParameters withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the serializedData property: Configuration of this particular workbook. Configuration data is a string - * containing valid JSON. - * - * @return the serializedData value. - */ - public String serializedData() { - return this.serializedData; - } - - /** - * Set the serializedData property: Configuration of this particular workbook. Configuration data is a string - * containing valid JSON. - * - * @param serializedData the serializedData value to set. - * @return the WorkbookUpdateParameters object itself. - */ - public WorkbookUpdateParameters withSerializedData(String serializedData) { - this.serializedData = serializedData; - return this; - } - - /** - * Get the category property: Workbook category, as defined by the user at creation time. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: Workbook category, as defined by the user at creation time. - * - * @param category the category value to set. - * @return the WorkbookUpdateParameters object itself. - */ - public WorkbookUpdateParameters withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the tagsPropertiesTags property: A list of 0 or more tags that are associated with this workbook definition. - * - * @return the tagsPropertiesTags value. - */ - public List tagsPropertiesTags() { - return this.tagsPropertiesTags; - } - - /** - * Set the tagsPropertiesTags property: A list of 0 or more tags that are associated with this workbook definition. - * - * @param tagsPropertiesTags the tagsPropertiesTags value to set. - * @return the WorkbookUpdateParameters object itself. - */ - public WorkbookUpdateParameters withTagsPropertiesTags(List tagsPropertiesTags) { - this.tagsPropertiesTags = tagsPropertiesTags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbooks.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbooks.java deleted file mode 100644 index 1cf00eacd504b..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbooks.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import java.util.List; - -/** Resource collection API of Workbooks. */ -public interface Workbooks { - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - PagedIterable list(CategoryType category); - - /** - * Get all private workbooks defined within a specified subscription and category. - * - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private workbooks defined within a specified subscription and category. - */ - PagedIterable list(CategoryType category, List tags, Boolean canFetchContent, Context context); - - /** - * Get all Workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbooks defined within a specified resource group and category. - */ - PagedIterable listByResourceGroup(String resourceGroupName, CategoryType category); - - /** - * Get all Workbooks defined within a specified resource group and category. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. - * @param tags Tags presents on each workbook returned. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Workbooks defined within a specified resource group and category. - */ - PagedIterable listByResourceGroup( - String resourceGroupName, - CategoryType category, - List tags, - String sourceId, - Boolean canFetchContent, - Context context); - - /** - * Get a single workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName. - */ - Workbook getByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Get a single workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); - - /** - * Delete a workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Delete a workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); - - /** - * Get a single workbook by its resourceName. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName. - */ - Workbook getById(String id); - - /** - * Get a single workbook by its resourceName. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a workbook. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a workbook. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Workbook resource. - * - * @param name resource name. - * @return the first stage of the new Workbook definition. - */ - Workbook.DefinitionStages.Blank define(String name); -} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbooksListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbooksListResult.java deleted file mode 100644 index 325e51719c7d9..0000000000000 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbooksListResult.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.applicationinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Workbook list result. */ -@Fluent -public final class WorkbooksListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkbooksListResult.class); - - /* - * An array of workbooks. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The nextLink property. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: An array of workbooks. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The nextLink property. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The nextLink property. - * - * @param nextLink the nextLink value to set. - * @return the WorkbooksListResult object itself. - */ - public WorkbooksListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -}