diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/pom.xml b/sdk/applicationinsights/mgmt-v2015_05_01/pom.xml index 215ef68f5b648..0665eb86b0663 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/pom.xml +++ b/sdk/applicationinsights/mgmt-v2015_05_01/pom.xml @@ -11,15 +11,15 @@ com.microsoft.azure azure-arm-parent - 1.2.0 - ../../parents/azure-arm-parent + 1.1.0 + ../../../pom.management.xml azure-mgmt-insights 1.0.0-beta jar Microsoft Azure SDK for Insights Management This package contains Microsoft Insights Management SDK. - https://github.com/Azure/azure-libraries-for-java + https://github.com/Azure/azure-sdk-for-java The MIT License (MIT) @@ -28,8 +28,8 @@ - scm:git:https://github.com/Azure/azure-libraries-for-java - scm:git:git@github.com:Azure/azure-libraries-for-java.git + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git HEAD @@ -71,6 +71,8 @@ azure-arm-client-runtime test-jar test + + 1.6.5 diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/APIKeyRequest.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/APIKeyRequest.java index 7e7ba918b2eaa..5ec8d23280e31 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/APIKeyRequest.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/APIKeyRequest.java @@ -12,7 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * An Application Insights component API Key createion request definition. + * An Application Insights component API Key creation request definition. */ public class APIKeyRequest { /** diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/APIKeys.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/APIKeys.java index a3a243df62722..2ae961fd0c15d 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/APIKeys.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/APIKeys.java @@ -20,7 +20,7 @@ public interface APIKeys extends HasInner { /** * Get the API Key for this key id. * - * @param resourceGroupName The name of the 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 keyId The API Key ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -31,7 +31,7 @@ public interface APIKeys extends HasInner { /** * Gets a list of API keys of an Application Insights component. * - * @param resourceGroupName The name of the 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 * @return the observable for the request @@ -41,7 +41,7 @@ public interface APIKeys extends HasInner { /** * Delete an API Key of an Application Insights component. * - * @param resourceGroupName The name of the 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 keyId The API Key ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -52,7 +52,7 @@ public interface APIKeys extends HasInner { /** * Create an API Key of an Application Insights component. * - * @param resourceGroupName The name of the 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 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 diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/AnalyticsItems.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/AnalyticsItems.java index cb3abbf6a6d2a..17f05ca2d44bd 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/AnalyticsItems.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/AnalyticsItems.java @@ -21,7 +21,7 @@ public interface AnalyticsItems extends HasInner { /** * Gets a list of Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @throws IllegalArgumentException thrown if parameters fail the validation @@ -32,7 +32,7 @@ public interface AnalyticsItems extends HasInner { /** * Gets a specific Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @throws IllegalArgumentException thrown if parameters fail the validation @@ -43,7 +43,7 @@ public interface AnalyticsItems extends HasInner { /** * Adds or Updates a specific Analytics Item within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @param itemProperties Properties that need to be specified to create a new item and add it to an Application Insights component. @@ -55,7 +55,7 @@ public interface AnalyticsItems extends HasInner { /** * Deletes a specific Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @throws IllegalArgumentException thrown if parameters fail the validation diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/Annotations.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/Annotations.java index cf545790539d8..05446742020ec 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/Annotations.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/Annotations.java @@ -21,7 +21,7 @@ public interface Annotations extends HasInner { /** * Create an Annotation of an Application Insights component. * - * @param resourceGroupName The name of the 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 annotationProperties Properties that need to be specified to create an annotation of a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -32,7 +32,7 @@ public interface Annotations extends HasInner { /** * Get the annotation for given id. * - * @param resourceGroupName The name of the 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 annotationId The unique annotation ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -43,7 +43,7 @@ public interface Annotations extends HasInner { /** * Gets the list of annotations for a component for given time range. * - * @param resourceGroupName The name of the 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 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. @@ -55,7 +55,7 @@ public interface Annotations extends HasInner { /** * Delete an Annotation of an Application Insights component. * - * @param resourceGroupName The name of the 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 annotationId The unique annotation ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponent.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponent.java index 65f6452d2f7be..0aac5fe923487 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponent.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponent.java @@ -19,6 +19,7 @@ import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.applicationinsights.v2015_05_01.implementation.InsightsManager; import org.joda.time.DateTime; +import java.util.List; import com.microsoft.azure.management.applicationinsights.v2015_05_01.implementation.ApplicationInsightsComponentInner; /** @@ -40,11 +41,21 @@ public interface ApplicationInsightsComponent extends HasInner privateLinkScopedResources(); + /** * @return the provisioningState value. */ @@ -80,6 +106,11 @@ public interface ApplicationInsightsComponent extends HasInner, Resource.DefinitionWithTags, DefinitionStages.WithFlowType, DefinitionStages.WithHockeyAppId, DefinitionStages.WithRequestSource, DefinitionStages.WithSamplingPercentage { + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithDisableIpMasking, DefinitionStages.WithFlowType, DefinitionStages.WithHockeyAppId, DefinitionStages.WithImmediatePurgeDataOn30Days, DefinitionStages.WithIngestionMode, DefinitionStages.WithRequestSource, DefinitionStages.WithRetentionInDays, DefinitionStages.WithSamplingPercentage { } } /** * The template for a ApplicationInsightsComponent update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithFlowType, UpdateStages.WithHockeyAppId, UpdateStages.WithRequestSource, UpdateStages.WithSamplingPercentage { + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithDisableIpMasking, UpdateStages.WithFlowType, UpdateStages.WithHockeyAppId, UpdateStages.WithImmediatePurgeDataOn30Days, UpdateStages.WithIngestionMode, UpdateStages.WithRequestSource, UpdateStages.WithRetentionInDays, UpdateStages.WithSamplingPercentage { } /** @@ -191,41 +282,97 @@ interface Update extends Appliable, Resource.Updat */ interface UpdateStages { /** - * The stage of the applicationinsightscomponent {0} allowing to specify FlowType. + * The stage of the applicationinsightscomponent update allowing to specify DisableIpMasking. + */ + interface WithDisableIpMasking { + /** + * Specifies disableIpMasking. + * @param disableIpMasking Disable IP masking + * @return the next update stage + */ + Update withDisableIpMasking(Boolean disableIpMasking); + } + + /** + * The stage of the applicationinsightscomponent update allowing to specify FlowType. */ interface WithFlowType { /** * Specifies flowType. + * @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. Possible values include: 'Bluefield' + * @return the next update stage */ Update withFlowType(FlowType flowType); } /** - * The stage of the applicationinsightscomponent {0} allowing to specify HockeyAppId. + * The stage of the applicationinsightscomponent update allowing to specify HockeyAppId. */ interface WithHockeyAppId { /** * Specifies hockeyAppId. + * @param hockeyAppId The unique application ID created when a new application is added to HockeyApp, used for communications with HockeyApp + * @return the next update stage */ Update withHockeyAppId(String hockeyAppId); } /** - * The stage of the applicationinsightscomponent {0} allowing to specify RequestSource. + * The stage of the applicationinsightscomponent update allowing to specify ImmediatePurgeDataOn30Days. + */ + interface WithImmediatePurgeDataOn30Days { + /** + * Specifies immediatePurgeDataOn30Days. + * @param immediatePurgeDataOn30Days Purge data immediately after 30 days + * @return the next update stage + */ + Update withImmediatePurgeDataOn30Days(Boolean immediatePurgeDataOn30Days); + } + + /** + * The stage of the applicationinsightscomponent update allowing to specify IngestionMode. + */ + interface WithIngestionMode { + /** + * Specifies ingestionMode. + * @param ingestionMode Indicates the flow of the ingestion. Possible values include: 'ApplicationInsights', 'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics' + * @return the next update stage + */ + Update withIngestionMode(IngestionMode ingestionMode); + } + + /** + * The stage of the applicationinsightscomponent update allowing to specify RequestSource. */ interface WithRequestSource { /** * Specifies requestSource. + * @param requestSource Describes what tool created this Application Insights component. Customers using this API should set this to the default 'rest'. Possible values include: 'rest' + * @return the next update stage */ Update withRequestSource(RequestSource requestSource); } /** - * The stage of the applicationinsightscomponent {0} allowing to specify SamplingPercentage. + * The stage of the applicationinsightscomponent update allowing to specify RetentionInDays. + */ + interface WithRetentionInDays { + /** + * Specifies retentionInDays. + * @param retentionInDays Retention period in days + * @return the next update stage + */ + Update withRetentionInDays(Integer retentionInDays); + } + + /** + * The stage of the applicationinsightscomponent update allowing to specify SamplingPercentage. */ interface WithSamplingPercentage { /** * Specifies samplingPercentage. + * @param samplingPercentage Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry + * @return the next update stage */ Update withSamplingPercentage(Double samplingPercentage); } diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentDataVolumeCap.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentDataVolumeCap.java index 2117aa2fcd746..47da2f3d85b2d 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentDataVolumeCap.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentDataVolumeCap.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * An Application Insights component daily data volumne cap. + * An Application Insights component daily data volume cap. */ public class ApplicationInsightsComponentDataVolumeCap { /** diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentFavorite.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentFavorite.java index 83fb566013bd7..bdaefc8ea96dc 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentFavorite.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentFavorite.java @@ -97,6 +97,9 @@ interface Blank extends WithComponent { interface WithComponent { /** * Specifies resourceGroupName, resourceName. + * @param resourceGroupName The name of the resource group. The name is case insensitive + * @param resourceName The name of the Application Insights component resource + * @return the next definition stage */ WithCreate withExistingComponent(String resourceGroupName, String resourceName); } @@ -107,6 +110,8 @@ interface WithComponent { interface WithCategory { /** * Specifies category. + * @param category Favorite category, as defined by the user at creation time + * @return the next definition stage */ WithCreate withCategory(String category); } @@ -117,6 +122,8 @@ interface WithCategory { interface WithConfig { /** * Specifies config. + * @param config Configuration of this particular favorite, which are driven by the Azure portal UX. Configuration data is a string containing valid JSON + * @return the next definition stage */ WithCreate withConfig(String config); } @@ -127,6 +134,8 @@ interface WithConfig { interface WithFavoriteType { /** * Specifies favoriteType. + * @param favoriteType 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. Possible values include: 'shared', 'user' + * @return the next definition stage */ WithCreate withFavoriteType(FavoriteType favoriteType); } @@ -137,6 +146,8 @@ interface WithFavoriteType { interface WithIsGeneratedFromTemplate { /** * Specifies isGeneratedFromTemplate. + * @param isGeneratedFromTemplate Flag denoting wether or not this favorite was generated from a template + * @return the next definition stage */ WithCreate withIsGeneratedFromTemplate(Boolean isGeneratedFromTemplate); } @@ -147,6 +158,8 @@ interface WithIsGeneratedFromTemplate { interface WithName { /** * Specifies name. + * @param name The user-defined name of the favorite + * @return the next definition stage */ WithCreate withName(String name); } @@ -157,6 +170,8 @@ interface WithName { interface WithSourceType { /** * Specifies sourceType. + * @param sourceType The source of the favorite definition + * @return the next definition stage */ WithCreate withSourceType(String sourceType); } @@ -167,6 +182,8 @@ interface WithSourceType { interface WithTags { /** * Specifies tags. + * @param tags A list of 0 or more tags that are associated with this favorite definition + * @return the next definition stage */ WithCreate withTags(List tags); } @@ -177,6 +194,8 @@ interface WithTags { interface WithVersion { /** * Specifies version. + * @param version 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 next definition stage */ WithCreate withVersion(String version); } diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentFeature.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentFeature.java index 1aa9d262e1463..c8c8238ba4e7f 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentFeature.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentFeature.java @@ -28,7 +28,7 @@ public class ApplicationInsightsComponentFeature { private String meterId; /** - * The meter meter rate for the feature's meter. + * The meter rate for the feature's meter. */ @JsonProperty(value = "MeterRateFrequency", access = JsonProperty.Access.WRITE_ONLY) private String meterRateFrequency; @@ -46,13 +46,13 @@ public class ApplicationInsightsComponentFeature { private Boolean isHidden; /** - * A list of Application Insigths component feature capability. + * A list of Application Insights component feature capability. */ @JsonProperty(value = "Capabilities", access = JsonProperty.Access.WRITE_ONLY) private List capabilities; /** - * Desplay name of the feature. + * Display name of the feature. */ @JsonProperty(value = "Title", access = JsonProperty.Access.WRITE_ONLY) private String title; @@ -88,7 +88,7 @@ public String meterId() { } /** - * Get the meter meter rate for the feature's meter. + * Get the meter rate for the feature's meter. * * @return the meterRateFrequency value */ @@ -115,7 +115,7 @@ public Boolean isHidden() { } /** - * Get a list of Application Insigths component feature capability. + * Get a list of Application Insights component feature capability. * * @return the capabilities value */ @@ -124,7 +124,7 @@ public List capabilities() { } /** - * Get desplay name of the feature. + * Get display name of the feature. * * @return the title value */ diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentFeatureCapability.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentFeatureCapability.java index f903b37cb2eaf..7a953b25444a4 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentFeatureCapability.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentFeatureCapability.java @@ -27,7 +27,7 @@ public class ApplicationInsightsComponentFeatureCapability { private String description; /** - * The vaule of the capability. + * The value of the capability. */ @JsonProperty(value = "Value", access = JsonProperty.Access.WRITE_ONLY) private String value; @@ -69,7 +69,7 @@ public String description() { } /** - * Get the vaule of the capability. + * Get the value of the capability. * * @return the value value */ diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.java index d9207dd003e6e..2c05678ea249d 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.java @@ -34,7 +34,7 @@ public class ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefi private String description; /** - * URL which displays aditional info about the proactive detection rule. + * URL which displays additional info about the proactive detection rule. */ @JsonProperty(value = "HelpUrl") private String helpUrl; @@ -125,7 +125,7 @@ public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinition } /** - * Get uRL which displays aditional info about the proactive detection rule. + * Get uRL which displays additional info about the proactive detection rule. * * @return the helpUrl value */ @@ -134,7 +134,7 @@ public String helpUrl() { } /** - * Set uRL which displays aditional info about the proactive detection rule. + * Set uRL which displays additional info about the proactive detection rule. * * @param helpUrl the helpUrl value to set * @return the ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions object itself. diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ComponentAvailableFeatures.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ComponentAvailableFeatures.java index af68a46e6b9c8..68906b10d4a95 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ComponentAvailableFeatures.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ComponentAvailableFeatures.java @@ -19,7 +19,7 @@ public interface ComponentAvailableFeatures extends HasInner { /** - * Returns feature capabilites of the application insights component. + * Returns feature capabilities of the application insights component. * - * @param resourceGroupName The name of the 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 * @return the observable for the request diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ComponentPurgeBodyFilters.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ComponentPurgeBodyFilters.java index 4dbf24c54aabe..fabce304e5019 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ComponentPurgeBodyFilters.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ComponentPurgeBodyFilters.java @@ -22,6 +22,8 @@ public class ComponentPurgeBodyFilters { /** * 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; @@ -33,6 +35,13 @@ public class ComponentPurgeBodyFilters { @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 of the table over which the given query should run. * @@ -54,7 +63,7 @@ public ComponentPurgeBodyFilters withColumn(String column) { } /** - * Get a query operator to evaluate over the provided column and value(s). + * Get 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 */ @@ -63,7 +72,7 @@ public String operator() { } /** - * Set a query operator to evaluate over the provided column and value(s). + * Set 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. @@ -93,4 +102,24 @@ public ComponentPurgeBodyFilters withValue(Object value) { return this; } + /** + * Get 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 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; + } + } diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ComponentQuotaStatus.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ComponentQuotaStatus.java index cd3a82939013a..efb54835636ad 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ComponentQuotaStatus.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ComponentQuotaStatus.java @@ -19,7 +19,7 @@ public interface ComponentQuotaStatus extends HasInner, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { /** * 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. + * @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 @@ -36,7 +37,7 @@ public interface Components extends SupportsCreating { + /** 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/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/MyWorkbook.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/MyWorkbook.java new file mode 100644 index 0000000000000..ee92e02fc5832 --- /dev/null +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/MyWorkbook.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.applicationinsights.v2015_05_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.applicationinsights.v2015_05_01.implementation.InsightsManager; +import java.util.List; +import com.microsoft.azure.management.applicationinsights.v2015_05_01.implementation.MyWorkbookInner; + +/** + * Type representing MyWorkbook. + */ +public interface MyWorkbook extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the category value. + */ + String category(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the kind value. + */ + SharedTypeKind kind(); + + /** + * @return the myWorkbookTags value. + */ + List myWorkbookTags(); + + /** + * @return the serializedData value. + */ + String serializedData(); + + /** + * @return the sourceId value. + */ + String sourceId(); + + /** + * @return the timeModified value. + */ + String timeModified(); + + /** + * @return the userId value. + */ + String userId(); + + /** + * @return the version value. + */ + String version(); + + /** + * The entirety of the MyWorkbook definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCategory, DefinitionStages.WithDisplayName, DefinitionStages.WithSerializedData, DefinitionStages.WithCreate { + } + + /** + * Grouping of MyWorkbook definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a MyWorkbook definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the MyWorkbook definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the myworkbook definition allowing to specify Category. + */ + interface WithCategory { + /** + * Specifies category. + * @param category Workbook category, as defined by the user at creation time + * @return the next definition stage +*/ + WithDisplayName withCategory(String category); + } + + /** + * The stage of the myworkbook definition allowing to specify DisplayName. + */ + interface WithDisplayName { + /** + * Specifies displayName. + * @param displayName The user-defined name of the private workbook + * @return the next definition stage +*/ + WithSerializedData withDisplayName(String displayName); + } + + /** + * The stage of the myworkbook definition allowing to specify SerializedData. + */ + interface WithSerializedData { + /** + * Specifies serializedData. + * @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 Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind The kind of workbook. Choices are user and shared. Possible values include: 'user', 'shared' + * @return the next definition stage + */ + WithCreate withKind(SharedTypeKind kind); + } + + /** + * The stage of the myworkbook definition allowing to specify MyWorkbookTags. + */ + interface WithMyWorkbookTags { + /** + * Specifies myWorkbookTags. + * @param myWorkbookTags A list of 0 or more tags that are associated with this private workbook definition + * @return the next definition stage + */ + WithCreate withMyWorkbookTags(List myWorkbookTags); + } + + /** + * The stage of the myworkbook definition allowing to specify SourceId. + */ + interface WithSourceId { + /** + * Specifies sourceId. + * @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 Version. + */ + interface WithVersion { + /** + * Specifies version. + * @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 definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithKind, DefinitionStages.WithMyWorkbookTags, DefinitionStages.WithSourceId, DefinitionStages.WithVersion { + } + } + /** + * The template for a MyWorkbook update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithKind, UpdateStages.WithMyWorkbookTags, UpdateStages.WithSourceId, UpdateStages.WithVersion { + } + + /** + * Grouping of MyWorkbook update stages. + */ + interface UpdateStages { + /** + * The stage of the myworkbook update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind The kind of workbook. Choices are user and shared. Possible values include: 'user', 'shared' + * @return the next update stage + */ + Update withKind(SharedTypeKind kind); + } + + /** + * The stage of the myworkbook update allowing to specify MyWorkbookTags. + */ + interface WithMyWorkbookTags { + /** + * Specifies myWorkbookTags. + * @param myWorkbookTags A list of 0 or more tags that are associated with this private workbook definition + * @return the next update stage + */ + Update withMyWorkbookTags(List myWorkbookTags); + } + + /** + * The stage of the myworkbook update allowing to specify SourceId. + */ + interface WithSourceId { + /** + * Specifies sourceId. + * @param sourceId Optional resourceId for a source resource + * @return the next update stage + */ + Update withSourceId(String sourceId); + } + + /** + * The stage of the myworkbook update allowing to specify Version. + */ + interface WithVersion { + /** + * Specifies version. + * @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 update stage + */ + Update withVersion(String version); + } + + } +} diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/MyWorkbookError.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/MyWorkbookError.java new file mode 100644 index 0000000000000..c171e13463fc0 --- /dev/null +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/MyWorkbookError.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.applicationinsights.v2015_05_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error message body that will indicate why the operation failed. + */ +public class MyWorkbookError { + /** + * Service-defined error code. This code serves as a sub-status for the + * HTTP error code specified in the response. + */ + @JsonProperty(value = "code") + private String code; + + /** + * Human-readable representation of the error. + */ + @JsonProperty(value = "message") + private String message; + + /** + * The list of invalid fields send in request, in case of validation error. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. + * + * @param code the code value to set + * @return the MyWorkbookError object itself. + */ + public MyWorkbookError withCode(String code) { + this.code = code; + return this; + } + + /** + * Get human-readable representation of the error. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set human-readable representation of the error. + * + * @param message the message value to set + * @return the MyWorkbookError object itself. + */ + public MyWorkbookError withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the list of invalid fields send in request, in case of validation error. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set the list of invalid fields send in request, in case of validation error. + * + * @param details the details value to set + * @return the MyWorkbookError object itself. + */ + public MyWorkbookError withDetails(List details) { + this.details = details; + return this; + } + +} diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/MyWorkbookErrorException.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/MyWorkbookErrorException.java new file mode 100644 index 0000000000000..9af889e392318 --- /dev/null +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/MyWorkbookErrorException.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.applicationinsights.v2015_05_01; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with MyWorkbookError information. + */ +public class MyWorkbookErrorException extends RestException { + /** + * Initializes a new instance of the MyWorkbookErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public MyWorkbookErrorException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the MyWorkbookErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public MyWorkbookErrorException(final String message, final Response response, final MyWorkbookError body) { + super(message, response, body); + } + + @Override + public MyWorkbookError body() { + return (MyWorkbookError) super.body(); + } +} diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/MyWorkbookResource.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/MyWorkbookResource.java new file mode 100644 index 0000000000000..06a55ad494f7c --- /dev/null +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/MyWorkbookResource.java @@ -0,0 +1,17 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.applicationinsights.v2015_05_01; + +import com.microsoft.azure.Resource; + +/** + * An azure resource object. + */ +public class MyWorkbookResource extends Resource { +} diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/MyWorkbooks.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/MyWorkbooks.java new file mode 100644 index 0000000000000..5f9c6c91e2d0f --- /dev/null +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/MyWorkbooks.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.applicationinsights.v2015_05_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.management.applicationinsights.v2015_05_01.implementation.MyWorkbooksInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing MyWorkbooks. + */ +public interface MyWorkbooks extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, HasInner { + /** + * 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. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByResourceGroupAsync(String resourceGroupName, CategoryType category); + + /** + * Get all private workbooks defined within a specified subscription and category. + * + * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(CategoryType category); + +} diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/PrivateLinkScopedResource.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/PrivateLinkScopedResource.java new file mode 100644 index 0000000000000..dde42d2458ab7 --- /dev/null +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/PrivateLinkScopedResource.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.applicationinsights.v2015_05_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The private link scope resource reference. + */ +public class PrivateLinkScopedResource { + /** + * 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 full resource Id of the private link scope resource. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set 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 private link scope unique Identifier. + * + * @return the scopeId value + */ + public String scopeId() { + return this.scopeId; + } + + /** + * Set 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; + } + +} diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ProactiveDetectionConfigurations.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ProactiveDetectionConfigurations.java index 495f08f0dd118..e370fb32163c3 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ProactiveDetectionConfigurations.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/ProactiveDetectionConfigurations.java @@ -19,7 +19,7 @@ public interface ProactiveDetectionConfigurations extends HasInner locations); } @@ -123,7 +125,9 @@ interface WithLocations { interface WithSyntheticMonitorId { /** * Specifies syntheticMonitorId. - */ + * @param syntheticMonitorId Unique ID of this WebTest. This is typically the same value as the Name field + * @return the next definition stage +*/ WithWebTestKind withSyntheticMonitorId(String syntheticMonitorId); } @@ -133,7 +137,9 @@ interface WithSyntheticMonitorId { interface WithWebTestKind { /** * Specifies webTestKind. - */ + * @param webTestKind The kind of web test this is, valid choices are ping and multistep. Possible values include: 'ping', 'multistep' + * @return the next definition stage +*/ WithWebTestName withWebTestKind(WebTestKind webTestKind); } @@ -143,76 +149,92 @@ interface WithWebTestKind { interface WithWebTestName { /** * Specifies webTestName. - */ + * @param webTestName User defined name if this WebTest + * @return the next definition stage +*/ WithCreate withWebTestName(String webTestName); } /** - * The stage of the webtest update allowing to specify Configuration. + * The stage of the webtest definition allowing to specify Configuration. */ interface WithConfiguration { /** * Specifies configuration. + * @param configuration An XML configuration specification for a WebTest + * @return the next definition stage */ WithCreate withConfiguration(WebTestPropertiesConfiguration configuration); } /** - * The stage of the webtest update allowing to specify Description. + * The stage of the webtest definition allowing to specify Description. */ interface WithDescription { /** * Specifies description. + * @param description Purpose/user defined descriptive test for this WebTest + * @return the next definition stage */ WithCreate withDescription(String description); } /** - * The stage of the webtest update allowing to specify Enabled. + * The stage of the webtest definition allowing to specify Enabled. */ interface WithEnabled { /** * Specifies enabled. + * @param enabled Is the test actively being monitored + * @return the next definition stage */ WithCreate withEnabled(Boolean enabled); } /** - * The stage of the webtest update allowing to specify Frequency. + * The stage of the webtest definition allowing to specify Frequency. */ interface WithFrequency { /** * Specifies frequency. + * @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 update allowing to specify Kind. + * The stage of the webtest definition allowing to specify Kind. */ interface WithKind { /** * Specifies kind. + * @param kind The kind of web test that this web test watches. Choices are ping and multistep. Possible values include: 'ping', 'multistep' + * @return the next definition stage */ WithCreate withKind(WebTestKind kind); } /** - * The stage of the webtest update allowing to specify RetryEnabled. + * The stage of the webtest definition allowing to specify RetryEnabled. */ interface WithRetryEnabled { /** * Specifies retryEnabled. + * @param retryEnabled Allow for retries should this WebTest fail + * @return the next definition stage */ WithCreate withRetryEnabled(Boolean retryEnabled); } /** - * The stage of the webtest update allowing to specify Timeout. + * The stage of the webtest definition allowing to specify Timeout. */ interface WithTimeout { /** * Specifies timeout. + * @param timeout Seconds until this WebTest will timeout and fail. Default value is 30 + * @return the next definition stage */ WithCreate withTimeout(Integer timeout); } @@ -236,71 +258,85 @@ interface Update extends Appliable, Resource.UpdateWithTags, Up */ interface UpdateStages { /** - * The stage of the webtest {0} allowing to specify Configuration. + * The stage of the webtest update allowing to specify Configuration. */ interface WithConfiguration { /** * Specifies configuration. + * @param configuration An XML configuration specification for a WebTest + * @return the next update stage */ Update withConfiguration(WebTestPropertiesConfiguration configuration); } /** - * The stage of the webtest {0} allowing to specify Description. + * The stage of the webtest update allowing to specify Description. */ interface WithDescription { /** * Specifies description. + * @param description Purpose/user defined descriptive test for this WebTest + * @return the next update stage */ Update withDescription(String description); } /** - * The stage of the webtest {0} allowing to specify Enabled. + * The stage of the webtest update allowing to specify Enabled. */ interface WithEnabled { /** * Specifies enabled. + * @param enabled Is the test actively being monitored + * @return the next update stage */ Update withEnabled(Boolean enabled); } /** - * The stage of the webtest {0} allowing to specify Frequency. + * The stage of the webtest update allowing to specify Frequency. */ interface WithFrequency { /** * Specifies frequency. + * @param frequency Interval in seconds between test runs for this WebTest. Default value is 300 + * @return the next update stage */ Update withFrequency(Integer frequency); } /** - * The stage of the webtest {0} allowing to specify Kind. + * The stage of the webtest update allowing to specify Kind. */ interface WithKind { /** * Specifies kind. + * @param kind The kind of web test that this web test watches. Choices are ping and multistep. Possible values include: 'ping', 'multistep' + * @return the next update stage */ Update withKind(WebTestKind kind); } /** - * The stage of the webtest {0} allowing to specify RetryEnabled. + * The stage of the webtest update allowing to specify RetryEnabled. */ interface WithRetryEnabled { /** * Specifies retryEnabled. + * @param retryEnabled Allow for retries should this WebTest fail + * @return the next update stage */ Update withRetryEnabled(Boolean retryEnabled); } /** - * The stage of the webtest {0} allowing to specify Timeout. + * The stage of the webtest update allowing to specify Timeout. */ interface WithTimeout { /** * Specifies timeout. + * @param timeout Seconds until this WebTest will timeout and fail. Default value is 30 + * @return the next update stage */ Update withTimeout(Integer timeout); } diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/WebTestLocations.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/WebTestLocations.java index 05cb42ac90a98..5aef0d836d169 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/WebTestLocations.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/WebTestLocations.java @@ -19,7 +19,7 @@ public interface WebTestLocations extends HasInner { /** * Gets a list of web test locations available to this Application Insights component. * - * @param resourceGroupName The name of the 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 * @return the observable for the request diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/WebTests.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/WebTests.java index 70345f1c055ce..5af4b13ee7a1f 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/WebTests.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/WebTests.java @@ -26,7 +26,7 @@ public interface WebTests extends SupportsCreating, HasManager { +public interface WorkItemConfiguration extends HasInner, Indexable, Refreshable, HasManager { /** * @return the configDisplayName value. */ diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/WorkItemConfigurations.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/WorkItemConfigurations.java index d10ebf35dfe1d..5677d8602b6d0 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/WorkItemConfigurations.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/WorkItemConfigurations.java @@ -16,10 +16,21 @@ * Type representing WorkItemConfigurations. */ public interface WorkItemConfigurations { + /** + * 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 + * @return the observable for the request + */ + Observable getItemAsync(String resourceGroupName, String resourceName, String workItemConfigId); + /** * Gets the list work item configurations that exist for the application. * - * @param resourceGroupName The name of the 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 * @return the observable for the request @@ -27,9 +38,9 @@ public interface WorkItemConfigurations { Observable listAsync(String resourceGroupName, String resourceName); /** - * Delete an workitem configuration of an Application Insights component. + * Delete a work item configuration of an Application Insights component. * - * @param resourceGroupName The name of the 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 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 @@ -37,10 +48,22 @@ public interface WorkItemConfigurations { */ Completable deleteAsync(String resourceGroupName, String resourceName, String workItemConfigId); + /** + * 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 + * @return the observable for the request + */ + Observable updateItemAsync(String resourceGroupName, String resourceName, String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties); + /** * Create a work item configuration for an Application Insights component. * - * @param resourceGroupName The name of the 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 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 @@ -51,7 +74,7 @@ public interface WorkItemConfigurations { /** * Gets default work item configurations that exist for the application. * - * @param resourceGroupName The name of the 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 * @return the observable for the request diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/WorkItemCreateConfiguration.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/WorkItemCreateConfiguration.java index 3cd43f6f324e3..b96789dd479c5 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/WorkItemCreateConfiguration.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/WorkItemCreateConfiguration.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.applicationinsights.v2015_05_01; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -21,7 +22,7 @@ public class WorkItemCreateConfiguration { private String connectorId; /** - * Serialized JSON object for detaile d properties. + * Serialized JSON object for detailed properties. */ @JsonProperty(value = "ConnectorDataConfiguration") private String connectorDataConfiguration; @@ -36,7 +37,7 @@ public class WorkItemCreateConfiguration { * Custom work item properties. */ @JsonProperty(value = "WorkItemProperties") - private String workItemProperties; + private Map workItemProperties; /** * Get unique connector id. @@ -59,7 +60,7 @@ public WorkItemCreateConfiguration withConnectorId(String connectorId) { } /** - * Get serialized JSON object for detaile d properties. + * Get serialized JSON object for detailed properties. * * @return the connectorDataConfiguration value */ @@ -68,7 +69,7 @@ public String connectorDataConfiguration() { } /** - * Set serialized JSON object for detaile d properties. + * Set serialized JSON object for detailed properties. * * @param connectorDataConfiguration the connectorDataConfiguration value to set * @return the WorkItemCreateConfiguration object itself. @@ -103,7 +104,7 @@ public WorkItemCreateConfiguration withValidateOnly(Boolean validateOnly) { * * @return the workItemProperties value */ - public String workItemProperties() { + public Map workItemProperties() { return this.workItemProperties; } @@ -113,7 +114,7 @@ public String workItemProperties() { * @param workItemProperties the workItemProperties value to set * @return the WorkItemCreateConfiguration object itself. */ - public WorkItemCreateConfiguration withWorkItemProperties(String workItemProperties) { + public WorkItemCreateConfiguration withWorkItemProperties(Map workItemProperties) { this.workItemProperties = workItemProperties; return this; } diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/Workbook.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/Workbook.java index 4b90e11c52ff7..42e6c4d10f052 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/Workbook.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/Workbook.java @@ -9,45 +9,32 @@ package com.microsoft.azure.management.applicationinsights.v2015_05_01; import com.microsoft.azure.arm.model.HasInner; -import com.microsoft.azure.management.applicationinsights.v2015_05_01.implementation.WorkbookInner; -import com.microsoft.azure.arm.model.Indexable; -import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; import com.microsoft.azure.arm.model.Updatable; import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.applicationinsights.v2015_05_01.implementation.InsightsManager; import java.util.List; -import java.util.Map; +import com.microsoft.azure.management.applicationinsights.v2015_05_01.implementation.WorkbookInner; /** * Type representing Workbook. */ -public interface Workbook extends HasInner, Indexable, Updatable, HasManager { +public interface Workbook extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { /** * @return the category value. */ String category(); - /** - * @return the id value. - */ - String id(); - /** * @return the kind value. */ SharedTypeKind kind(); - /** - * @return the location value. - */ - String location(); - - /** - * @return the name value. - */ - String name(); - /** * @return the serializedData value. */ @@ -63,21 +50,11 @@ public interface Workbook extends HasInner, Indexable, Updatable< */ String sourceResourceId(); - /** - * @return the tags value. - */ - Map tags(); - /** * @return the timeModified value. */ String timeModified(); - /** - * @return the type value. - */ - String type(); - /** * @return the userId value. */ @@ -106,7 +83,7 @@ public interface Workbook extends HasInner, Indexable, Updatable< /** * The entirety of the Workbook definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithResourceGroupName, DefinitionStages.WithCategory, DefinitionStages.WithLocation, DefinitionStages.WithSerializedData, DefinitionStages.WithSharedTypeKind, DefinitionStages.WithUserId, DefinitionStages.WithWorkbookId, DefinitionStages.WithWorkbookName, DefinitionStages.WithCreate { + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCategory, DefinitionStages.WithSerializedData, DefinitionStages.WithSharedTypeKind, DefinitionStages.WithUserId, DefinitionStages.WithWorkbookId, DefinitionStages.WithWorkbookName, DefinitionStages.WithCreate { } /** @@ -116,17 +93,13 @@ interface DefinitionStages { /** * The first stage of a Workbook definition. */ - interface Blank extends WithResourceGroupName { + interface Blank extends GroupableResourceCore.DefinitionWithRegion { } /** - * The stage of the workbook definition allowing to specify ResourceGroupName. + * The stage of the Workbook definition allowing to specify the resource group. */ - interface WithResourceGroupName { - /** - * Specifies resourceGroupName. - */ - WithCategory withResourceGroupName(String resourceGroupName); + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { } /** @@ -135,18 +108,10 @@ interface WithResourceGroupName { interface WithCategory { /** * Specifies category. - */ - WithLocation withCategory(String category); - } - - /** - * The stage of the workbook definition allowing to specify Location. - */ - interface WithLocation { - /** - * Specifies location. - */ - WithSerializedData withLocation(String location); + * @param category Workbook category, as defined by the user at creation time + * @return the next definition stage +*/ + WithSerializedData withCategory(String category); } /** @@ -155,7 +120,9 @@ interface WithLocation { interface WithSerializedData { /** * Specifies serializedData. - */ + * @param serializedData Configuration of this particular workbook. Configuration data is a string containing valid JSON + * @return the next definition stage +*/ WithSharedTypeKind withSerializedData(String serializedData); } @@ -165,7 +132,9 @@ interface WithSerializedData { interface WithSharedTypeKind { /** * Specifies sharedTypeKind. - */ + * @param sharedTypeKind Enum indicating if this workbook definition is owned by a specific user or is shared between all users with access to the Application Insights component. Possible values include: 'user', 'shared' + * @return the next definition stage +*/ WithUserId withSharedTypeKind(SharedTypeKind sharedTypeKind); } @@ -175,7 +144,9 @@ interface WithSharedTypeKind { interface WithUserId { /** * Specifies userId. - */ + * @param userId Unique user id of the specific user that owns this workbook + * @return the next definition stage +*/ WithWorkbookId withUserId(String userId); } @@ -185,7 +156,9 @@ interface WithUserId { interface WithWorkbookId { /** * Specifies workbookId. - */ + * @param workbookId Internally assigned unique id of the workbook definition + * @return the next definition stage +*/ WithWorkbookName withWorkbookId(String workbookId); } @@ -195,7 +168,9 @@ interface WithWorkbookId { interface WithWorkbookName { /** * Specifies workbookName. - */ + * @param workbookName The user-defined name of the workbook + * @return the next definition stage +*/ WithCreate withWorkbookName(String workbookName); } @@ -205,6 +180,8 @@ interface WithWorkbookName { interface WithKind { /** * Specifies kind. + * @param kind The kind of workbook. Choices are user and shared. Possible values include: 'user', 'shared' + * @return the next definition stage */ WithCreate withKind(SharedTypeKind kind); } @@ -215,26 +192,20 @@ interface WithKind { interface WithSourceResourceId { /** * Specifies sourceResourceId. + * @param sourceResourceId Optional resourceId for a source resource + * @return the next definition stage */ WithCreate withSourceResourceId(String sourceResourceId); } - /** - * The stage of the workbook definition allowing to specify Tags. - */ - interface WithTags { - /** - * Specifies tags. - */ - WithCreate withTags(Map tags); - } - /** * The stage of the workbook definition allowing to specify Version. */ interface WithVersion { /** * Specifies version. + * @param version This instance's version of the data model. This can change as new features are added that can be marked workbook + * @return the next definition stage */ WithCreate withVersion(String version); } @@ -245,6 +216,8 @@ interface WithVersion { interface WithWorkbookTags { /** * Specifies workbookTags. + * @param workbookTags A list of 0 or more tags that are associated with this workbook definition + * @return the next definition stage */ WithCreate withWorkbookTags(List workbookTags); } @@ -254,13 +227,13 @@ interface WithWorkbookTags { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, DefinitionStages.WithKind, DefinitionStages.WithSourceResourceId, DefinitionStages.WithTags, DefinitionStages.WithVersion, DefinitionStages.WithWorkbookTags { + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithKind, DefinitionStages.WithSourceResourceId, DefinitionStages.WithVersion, DefinitionStages.WithWorkbookTags { } } /** * The template for a Workbook update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, UpdateStages.WithKind, UpdateStages.WithSourceResourceId, UpdateStages.WithTags, UpdateStages.WithVersion, UpdateStages.WithWorkbookTags { + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithKind, UpdateStages.WithSourceResourceId, UpdateStages.WithVersion, UpdateStages.WithWorkbookTags { } /** @@ -273,6 +246,8 @@ interface UpdateStages { interface WithKind { /** * Specifies kind. + * @param kind The kind of workbook. Choices are user and shared. Possible values include: 'user', 'shared' + * @return the next update stage */ Update withKind(SharedTypeKind kind); } @@ -283,26 +258,20 @@ interface WithKind { interface WithSourceResourceId { /** * Specifies sourceResourceId. + * @param sourceResourceId Optional resourceId for a source resource + * @return the next update stage */ Update withSourceResourceId(String sourceResourceId); } - /** - * The stage of the workbook update allowing to specify Tags. - */ - interface WithTags { - /** - * Specifies tags. - */ - Update withTags(Map tags); - } - /** * The stage of the workbook update allowing to specify Version. */ interface WithVersion { /** * Specifies version. + * @param version This instance's version of the data model. This can change as new features are added that can be marked workbook + * @return the next update stage */ Update withVersion(String version); } @@ -313,6 +282,8 @@ interface WithVersion { interface WithWorkbookTags { /** * Specifies workbookTags. + * @param workbookTags A list of 0 or more tags that are associated with this workbook definition + * @return the next update stage */ Update withWorkbookTags(List workbookTags); } diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/Workbooks.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/Workbooks.java index 86eb73b2c2422..bac1bc4ab1a02 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/Workbooks.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/Workbooks.java @@ -9,7 +9,9 @@ package com.microsoft.azure.management.applicationinsights.v2015_05_01; import com.microsoft.azure.arm.collection.SupportsCreating; -import rx.Completable; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; import rx.Observable; import com.microsoft.azure.management.applicationinsights.v2015_05_01.implementation.WorkbooksInner; import com.microsoft.azure.arm.model.HasInner; @@ -17,31 +19,11 @@ /** * Type representing Workbooks. */ -public interface Workbooks extends SupportsCreating, HasInner { - /** - * Get a single workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable getAsync(String resourceGroupName, String resourceName); - - /** - * Delete a workbook. - * - * @param resourceGroupName The name of the resource group. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Completable deleteAsync(String resourceGroupName, String resourceName); - +public interface Workbooks extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, HasInner { /** * Get all Workbooks defined within a specified resource group and category. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/APIKeysImpl.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/APIKeysImpl.java index ba00ae3f23c0c..d06c21d79ad32 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/APIKeysImpl.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/APIKeysImpl.java @@ -56,10 +56,14 @@ public ApplicationInsightsComponentAPIKey call(ApplicationInsightsComponentAPIKe public Observable getAsync(String resourceGroupName, String resourceName, String keyId) { APIKeysInner client = this.inner(); return client.getAsync(resourceGroupName, resourceName, keyId) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ApplicationInsightsComponentAPIKey call(ApplicationInsightsComponentAPIKeyInner inner) { - return wrapModel(inner); + public Observable call(ApplicationInsightsComponentAPIKeyInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ApplicationInsightsComponentAPIKey)wrapModel(inner)); + } } }); } diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/APIKeysInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/APIKeysInner.java index 1bbfafca118b8..a57f0cb090e0c 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/APIKeysInner.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/APIKeysInner.java @@ -78,7 +78,7 @@ interface APIKeysService { /** * Gets a list of API keys of an Application Insights component. * - * @param resourceGroupName The name of the 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 CloudException thrown if the request is rejected by server @@ -92,7 +92,7 @@ public List list(String resourceGroupNa /** * Gets a list of API keys of an Application Insights component. * - * @param resourceGroupName The name of the 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -105,7 +105,7 @@ public ServiceFuture> listAsync(St /** * Gets a list of API keys of an Application Insights component. * - * @param resourceGroupName The name of the 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 * @return the observable to the List<ApplicationInsightsComponentAPIKeyInner> object @@ -122,7 +122,7 @@ public List call(ServiceResponse> list /** * Create an API Key of an Application Insights component. * - * @param resourceGroupName The name of the 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 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 @@ -184,7 +184,7 @@ public ApplicationInsightsComponentAPIKeyInner create(String resourceGroupName, /** * Create an API Key of an Application Insights component. * - * @param resourceGroupName The name of the 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 aPIKeyProperties Properties that need to be specified to create an API key of a Application Insights component. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -198,7 +198,7 @@ public ServiceFuture createAsync(String /** * Create an API Key of an Application Insights component. * - * @param resourceGroupName The name of the 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 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 @@ -216,7 +216,7 @@ public ApplicationInsightsComponentAPIKeyInner call(ServiceResponse createDelegate( /** * Delete an API Key of an Application Insights component. * - * @param resourceGroupName The name of the 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 keyId The API Key ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -278,7 +278,7 @@ public ApplicationInsightsComponentAPIKeyInner delete(String resourceGroupName, /** * Delete an API Key of an Application Insights component. * - * @param resourceGroupName The name of the 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 keyId The API Key ID. This is unique within a Application Insights component. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -292,7 +292,7 @@ public ServiceFuture deleteAsync(String /** * Delete an API Key of an Application Insights component. * - * @param resourceGroupName The name of the 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 keyId The API Key ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -310,7 +310,7 @@ public ApplicationInsightsComponentAPIKeyInner call(ServiceResponse deleteDelegate( /** * Get the API Key for this key id. * - * @param resourceGroupName The name of the 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 keyId The API Key ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -371,7 +371,7 @@ public ApplicationInsightsComponentAPIKeyInner get(String resourceGroupName, Str /** * Get the API Key for this key id. * - * @param resourceGroupName The name of the 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 keyId The API Key ID. This is unique within a Application Insights component. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -385,7 +385,7 @@ public ServiceFuture getAsync(String re /** * Get the API Key for this key id. * - * @param resourceGroupName The name of the 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 keyId The API Key ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -403,7 +403,7 @@ public ApplicationInsightsComponentAPIKeyInner call(ServiceResponse list(String resource /** * Gets a list of Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -109,7 +109,7 @@ public ServiceFuture> listA /** * Gets a list of Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @throws IllegalArgumentException thrown if parameters fail the validation @@ -127,7 +127,7 @@ public List call(ServiceResponse /** * Gets a list of Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @throws IllegalArgumentException thrown if parameters fail the validation @@ -169,7 +169,7 @@ public Observable list(String resource /** * Gets a list of Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @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. Possible values include: 'shared', 'user' @@ -204,7 +204,7 @@ public ServiceFuture> listA /** * Gets a list of Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @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. Possible values include: 'shared', 'user' @@ -225,7 +225,7 @@ public List call(ServiceResponse /** * Gets a list of Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @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. Possible values include: 'shared', 'user' @@ -274,7 +274,7 @@ private ServiceResponse> li /** * Gets a specific Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @throws IllegalArgumentException thrown if parameters fail the validation @@ -289,7 +289,7 @@ public ApplicationInsightsComponentAnalyticsItemInner get(String resourceGroupNa /** * Gets a specific Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -303,7 +303,7 @@ public ServiceFuture getAsync(St /** * Gets a specific Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @throws IllegalArgumentException thrown if parameters fail the validation @@ -321,7 +321,7 @@ public ApplicationInsightsComponentAnalyticsItemInner call(ServiceResponse getAsync(St /** * Gets a specific Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @param id The Id of a specific item defined in the Application Insights component @@ -415,7 +415,7 @@ public ApplicationInsightsComponentAnalyticsItemInner call(ServiceResponse getDeleg /** * Adds or Updates a specific Analytics Item within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @param itemProperties Properties that need to be specified to create a new item and add it to an Application Insights component. @@ -479,7 +479,7 @@ public ApplicationInsightsComponentAnalyticsItemInner put(String resourceGroupNa /** * Adds or Updates a specific Analytics Item within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @param itemProperties Properties that need to be specified to create a new item and add it to an Application Insights component. @@ -494,7 +494,7 @@ public ServiceFuture putAsync(St /** * Adds or Updates a specific Analytics Item within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @param itemProperties Properties that need to be specified to create a new item and add it to an Application Insights component. @@ -513,7 +513,7 @@ public ApplicationInsightsComponentAnalyticsItemInner call(ServiceResponse putAsync(St /** * Adds or Updates a specific Analytics Item within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @param itemProperties Properties that need to be specified to create a new item and add it to an Application Insights component. @@ -611,7 +611,7 @@ public ApplicationInsightsComponentAnalyticsItemInner call(ServiceResponse putDeleg /** * Deletes a specific Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @throws IllegalArgumentException thrown if parameters fail the validation @@ -677,7 +677,7 @@ public void delete(String resourceGroupName, String resourceName, ItemScopePath /** * Deletes a specific Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -691,7 +691,7 @@ public ServiceFuture deleteAsync(String resourceGroupName, String resource /** * Deletes a specific Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @throws IllegalArgumentException thrown if parameters fail the validation @@ -709,7 +709,7 @@ public Void call(ServiceResponse response) { /** * Deletes a specific Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @throws IllegalArgumentException thrown if parameters fail the validation @@ -750,7 +750,7 @@ public Observable> call(Response response) { /** * Deletes a specific Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @param id The Id of a specific item defined in the Application Insights component @@ -766,7 +766,7 @@ public void delete(String resourceGroupName, String resourceName, ItemScopePath /** * Deletes a specific Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @param id The Id of a specific item defined in the Application Insights component @@ -782,7 +782,7 @@ public ServiceFuture deleteAsync(String resourceGroupName, String resource /** * Deletes a specific Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @param id The Id of a specific item defined in the Application Insights component @@ -802,7 +802,7 @@ public Void call(ServiceResponse response) { /** * Deletes a specific Analytics Items defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 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. Possible values include: 'analyticsItems', 'myanalyticsItems' * @param id The Id of a specific item defined in the Application Insights component diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/AnnotationsInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/AnnotationsInner.java index c3346fd86fc12..699e5544c5a65 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/AnnotationsInner.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/AnnotationsInner.java @@ -78,7 +78,7 @@ interface AnnotationsService { /** * Gets the list of annotations for a component for given time range. * - * @param resourceGroupName The name of the 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 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. @@ -94,7 +94,7 @@ public List list(String resourceGroupName, String resourceName, /** * Gets the list of annotations for a component for given time range. * - * @param resourceGroupName The name of the 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 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. @@ -109,7 +109,7 @@ public ServiceFuture> listAsync(String resourceGroupName, /** * Gets the list of annotations for a component for given time range. * - * @param resourceGroupName The name of the 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 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. @@ -128,7 +128,7 @@ public List call(ServiceResponse> respons /** * Gets the list of annotations for a component for given time range. * - * @param resourceGroupName The name of the 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 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. @@ -183,7 +183,7 @@ private ServiceResponse> listDelegate(Response create(String resourceGroupName, String resourceNam /** * Create an Annotation of an Application Insights component. * - * @param resourceGroupName The name of the 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 annotationProperties Properties that need to be specified to create an annotation of a Application Insights component. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -212,7 +212,7 @@ public ServiceFuture> createAsync(String resourceGroupName /** * Create an Annotation of an Application Insights component. * - * @param resourceGroupName The name of the 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 annotationProperties Properties that need to be specified to create an annotation of a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -230,7 +230,7 @@ public List call(ServiceResponse> respons /** * Create an Annotation of an Application Insights component. * - * @param resourceGroupName The name of the 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 annotationProperties Properties that need to be specified to create an annotation of a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -277,45 +277,44 @@ private ServiceResponse> createDelegate(Response deleteAsync(String resourceGroupName, String resourceName, String annotationId, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String resourceName, String annotationId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, resourceName, annotationId), serviceCallback); } /** * Delete an Annotation of an Application Insights component. * - * @param resourceGroupName The name of the 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 annotationId The unique annotation ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Object object + * @return the {@link ServiceResponse} object if successful. */ - public Observable deleteAsync(String resourceGroupName, String resourceName, String annotationId) { - return deleteWithServiceResponseAsync(resourceGroupName, resourceName, annotationId).map(new Func1, Object>() { + public Observable deleteAsync(String resourceGroupName, String resourceName, String annotationId) { + return deleteWithServiceResponseAsync(resourceGroupName, resourceName, annotationId).map(new Func1, Void>() { @Override - public Object call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -324,13 +323,13 @@ public Object call(ServiceResponse response) { /** * Delete an Annotation of an Application Insights component. * - * @param resourceGroupName The name of the 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 annotationId The unique annotation ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Object object + * @return the {@link ServiceResponse} object if successful. */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String resourceName, String annotationId) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String resourceName, String annotationId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -347,11 +346,11 @@ public Observable> deleteWithServiceResponseAsync(String throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.delete(resourceGroupName, this.client.subscriptionId(), resourceName, annotationId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteDelegate(response); + ServiceResponse clientResponse = deleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -360,9 +359,9 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -370,7 +369,7 @@ private ServiceResponse deleteDelegate(Response response) /** * Get the annotation for given id. * - * @param resourceGroupName The name of the 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 annotationId The unique annotation ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -385,7 +384,7 @@ public List get(String resourceGroupName, String resourceName, /** * Get the annotation for given id. * - * @param resourceGroupName The name of the 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 annotationId The unique annotation ID. This is unique within a Application Insights component. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -399,7 +398,7 @@ public ServiceFuture> getAsync(String resourceGroupName, S /** * Get the annotation for given id. * - * @param resourceGroupName The name of the 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 annotationId The unique annotation ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -417,7 +416,7 @@ public List call(ServiceResponse> respons /** * Get the annotation for given id. * - * @param resourceGroupName The name of the 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 annotationId The unique annotation ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentAPIKeyImpl.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentAPIKeyImpl.java index 1dabd5ef041bd..b6492bad8b29e 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentAPIKeyImpl.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentAPIKeyImpl.java @@ -22,6 +22,7 @@ class ApplicationInsightsComponentAPIKeyImpl extends IndexableRefreshableWrapper ApplicationInsightsComponentAPIKeyImpl(ApplicationInsightsComponentAPIKeyInner inner, InsightsManager manager) { super(null, inner); this.manager = manager; + // set resource ancestor and positional variables this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); this.resourceName = IdParsingUtils.getValueFromIdByName(inner.id(), "components"); this.keyId = IdParsingUtils.getValueFromIdByName(inner.id(), "APIKeys"); diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentAPIKeyInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentAPIKeyInner.java index 61db0e2a24a3d..c8ad8954ee262 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentAPIKeyInner.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentAPIKeyInner.java @@ -16,7 +16,7 @@ */ public class ApplicationInsightsComponentAPIKeyInner { /** - * The unique ID of the API key inside an Applciation Insights component. + * 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) @@ -54,7 +54,7 @@ public class ApplicationInsightsComponentAPIKeyInner { private List linkedWriteProperties; /** - * Get the unique ID of the API key inside an Applciation Insights component. It is auto generated when the API key is created. + * Get 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 */ diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentAvailableFeaturesInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentAvailableFeaturesInner.java index b76aaaafe34e5..278fa313a7295 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentAvailableFeaturesInner.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentAvailableFeaturesInner.java @@ -17,13 +17,13 @@ */ public class ApplicationInsightsComponentAvailableFeaturesInner { /** - * A list of Application Insigths component feature. + * A list of Application Insights component feature. */ @JsonProperty(value = "Result", access = JsonProperty.Access.WRITE_ONLY) private List result; /** - * Get a list of Application Insigths component feature. + * Get a list of Application Insights component feature. * * @return the result value */ diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentBillingFeaturesInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentBillingFeaturesInner.java index 0e8165faa8190..8c64cfffc41c4 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentBillingFeaturesInner.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentBillingFeaturesInner.java @@ -17,7 +17,7 @@ */ public class ApplicationInsightsComponentBillingFeaturesInner { /** - * An Application Insights component daily data volumne cap. + * An Application Insights component daily data volume cap. */ @JsonProperty(value = "DataVolumeCap") private ApplicationInsightsComponentDataVolumeCap dataVolumeCap; @@ -30,7 +30,7 @@ public class ApplicationInsightsComponentBillingFeaturesInner { private List currentBillingFeatures; /** - * Get an Application Insights component daily data volumne cap. + * Get an Application Insights component daily data volume cap. * * @return the dataVolumeCap value */ @@ -39,7 +39,7 @@ public ApplicationInsightsComponentDataVolumeCap dataVolumeCap() { } /** - * Set an Application Insights component daily data volumne cap. + * Set an Application Insights component daily data volume cap. * * @param dataVolumeCap the dataVolumeCap value to set * @return the ApplicationInsightsComponentBillingFeaturesInner object itself. diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentExportConfigurationInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentExportConfigurationInner.java index dffe142d10fc6..563a2b9c743cb 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentExportConfigurationInner.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentExportConfigurationInner.java @@ -15,7 +15,7 @@ */ public class ApplicationInsightsComponentExportConfigurationInner { /** - * The unique ID of the export configuration inside an Applciation Insights + * The unique ID of the export configuration inside an Application Insights * component. It is auto generated when the Continuous Export configuration * is created. */ @@ -138,7 +138,7 @@ public class ApplicationInsightsComponentExportConfigurationInner { private String containerName; /** - * Get the unique ID of the export configuration inside an Applciation Insights component. It is auto generated when the Continuous Export configuration is created. + * Get 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 */ diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentFavoriteImpl.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentFavoriteImpl.java index dfbd8aadbdf17..98c0e91f72d99 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentFavoriteImpl.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentFavoriteImpl.java @@ -33,7 +33,6 @@ class ApplicationInsightsComponentFavoriteImpl extends CreatableUpdatableImpl getInnerAsync() } @Override - public boolean isInCreateMode() { return false; } + public boolean isInCreateMode() { + // This is a create-only resource + return true; + } @Override diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentFeatureCapabilitiesInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentFeatureCapabilitiesInner.java index cdfe9d57a32d7..7df71681d60e9 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentFeatureCapabilitiesInner.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentFeatureCapabilitiesInner.java @@ -87,7 +87,7 @@ public class ApplicationInsightsComponentFeatureCapabilitiesInner { private String apiAccessLevel; /** - * The applciation insights component used tracking type. + * The application insights component used tracking type. */ @JsonProperty(value = "TrackingType", access = JsonProperty.Access.WRITE_ONLY) private String trackingType; @@ -219,7 +219,7 @@ public String apiAccessLevel() { } /** - * Get the applciation insights component used tracking type. + * Get the application insights component used tracking type. * * @return the trackingType value */ diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentImpl.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentImpl.java index 3e29029247e9a..72598f6f65e62 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentImpl.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentImpl.java @@ -15,6 +15,9 @@ import com.microsoft.azure.management.applicationinsights.v2015_05_01.FlowType; import com.microsoft.azure.management.applicationinsights.v2015_05_01.RequestSource; import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.applicationinsights.v2015_05_01.PrivateLinkScopedResource; +import com.microsoft.azure.management.applicationinsights.v2015_05_01.IngestionMode; class ApplicationInsightsComponentImpl extends GroupableResourceCoreImpl implements ApplicationInsightsComponent, ApplicationInsightsComponent.Definition, ApplicationInsightsComponent.Update { ApplicationInsightsComponentImpl(String name, ApplicationInsightsComponentInner inner, InsightsManager manager) { @@ -62,11 +65,21 @@ public ApplicationType applicationType() { return this.inner().applicationType(); } + @Override + public String connectionString() { + return this.inner().connectionString(); + } + @Override public DateTime creationDate() { return this.inner().creationDate(); } + @Override + public Boolean disableIpMasking() { + return this.inner().disableIpMasking(); + } + @Override public FlowType flowType() { return this.inner().flowType(); @@ -82,6 +95,16 @@ public String hockeyAppToken() { return this.inner().hockeyAppToken(); } + @Override + public Boolean immediatePurgeDataOn30Days() { + return this.inner().immediatePurgeDataOn30Days(); + } + + @Override + public IngestionMode ingestionMode() { + return this.inner().ingestionMode(); + } + @Override public String instrumentationKey() { return this.inner().instrumentationKey(); @@ -92,6 +115,11 @@ public String kind() { return this.inner().kind(); } + @Override + public List privateLinkScopedResources() { + return this.inner().privateLinkScopedResources(); + } + @Override public String provisioningState() { return this.inner().provisioningState(); @@ -102,6 +130,11 @@ public RequestSource requestSource() { return this.inner().requestSource(); } + @Override + public Integer retentionInDays() { + return this.inner().retentionInDays(); + } + @Override public Double samplingPercentage() { return this.inner().samplingPercentage(); @@ -124,6 +157,12 @@ public ApplicationInsightsComponentImpl withKind(String kind) { return this; } + @Override + public ApplicationInsightsComponentImpl withDisableIpMasking(Boolean disableIpMasking) { + this.inner().withDisableIpMasking(disableIpMasking); + return this; + } + @Override public ApplicationInsightsComponentImpl withFlowType(FlowType flowType) { this.inner().withFlowType(flowType); @@ -136,12 +175,30 @@ public ApplicationInsightsComponentImpl withHockeyAppId(String hockeyAppId) { return this; } + @Override + public ApplicationInsightsComponentImpl withImmediatePurgeDataOn30Days(Boolean immediatePurgeDataOn30Days) { + this.inner().withImmediatePurgeDataOn30Days(immediatePurgeDataOn30Days); + return this; + } + + @Override + public ApplicationInsightsComponentImpl withIngestionMode(IngestionMode ingestionMode) { + this.inner().withIngestionMode(ingestionMode); + return this; + } + @Override public ApplicationInsightsComponentImpl withRequestSource(RequestSource requestSource) { this.inner().withRequestSource(requestSource); return this; } + @Override + public ApplicationInsightsComponentImpl withRetentionInDays(Integer retentionInDays) { + this.inner().withRetentionInDays(retentionInDays); + return this; + } + @Override public ApplicationInsightsComponentImpl withSamplingPercentage(Double samplingPercentage) { this.inner().withSamplingPercentage(samplingPercentage); diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentInner.java index dc6ae4313b771..8daf8f20c8469 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentInner.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsComponentInner.java @@ -12,6 +12,9 @@ import com.microsoft.azure.management.applicationinsights.v2015_05_01.FlowType; import com.microsoft.azure.management.applicationinsights.v2015_05_01.RequestSource; import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.applicationinsights.v2015_05_01.PrivateLinkScopedResource; +import com.microsoft.azure.management.applicationinsights.v2015_05_01.IngestionMode; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.applicationinsights.v2015_05_01.ComponentsResource; @@ -118,6 +121,44 @@ public class ApplicationInsightsComponentInner extends ComponentsResource { @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. Possible values include: + * 'ApplicationInsights', 'ApplicationInsightsWithDiagnosticSettings', + * 'LogAnalytics'. + */ + @JsonProperty(value = "properties.IngestionMode") + private IngestionMode ingestionMode; + /** * Get 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. * @@ -301,4 +342,102 @@ public ApplicationInsightsComponentInner withSamplingPercentage(Double samplingP return this; } + /** + * Get application Insights component connection string. + * + * @return the connectionString value + */ + public String connectionString() { + return this.connectionString; + } + + /** + * Get retention period in days. + * + * @return the retentionInDays value + */ + public Integer retentionInDays() { + return this.retentionInDays; + } + + /** + * Set 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 disable IP masking. + * + * @return the disableIpMasking value + */ + public Boolean disableIpMasking() { + return this.disableIpMasking; + } + + /** + * Set 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 purge data immediately after 30 days. + * + * @return the immediatePurgeDataOn30Days value + */ + public Boolean immediatePurgeDataOn30Days() { + return this.immediatePurgeDataOn30Days; + } + + /** + * Set 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 list of linked private link scope resources. + * + * @return the privateLinkScopedResources value + */ + public List privateLinkScopedResources() { + return this.privateLinkScopedResources; + } + + /** + * Get indicates the flow of the ingestion. Possible values include: 'ApplicationInsights', 'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. + * + * @return the ingestionMode value + */ + public IngestionMode ingestionMode() { + return this.ingestionMode; + } + + /** + * Set indicates the flow of the ingestion. Possible values include: 'ApplicationInsights', 'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. + * + * @param ingestionMode the ingestionMode value to set + * @return the ApplicationInsightsComponentInner object itself. + */ + public ApplicationInsightsComponentInner withIngestionMode(IngestionMode ingestionMode) { + this.ingestionMode = ingestionMode; + return this; + } + } diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsManagementClientImpl.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsManagementClientImpl.java index ab0fcf9b8944f..77991bbd2c8fd 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsManagementClientImpl.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ApplicationInsightsManagementClientImpl.java @@ -28,11 +28,11 @@ public AzureClient getAzureClient() { return this.azureClient; } - /** Client Api Version. */ + /** The API version to use for this operation. */ private String apiVersion; /** - * Gets Client Api Version. + * Gets The API version to use for this operation. * * @return the apiVersion value. */ @@ -40,11 +40,11 @@ public String apiVersion() { return this.apiVersion; } - /** The Azure subscription ID. */ + /** The ID of the target subscription. */ private String subscriptionId; /** - * Gets The Azure subscription ID. + * Gets The ID of the target subscription. * * @return the subscriptionId value. */ @@ -53,7 +53,7 @@ public String subscriptionId() { } /** - * Sets The Azure subscription ID. + * Sets The ID of the target subscription. * * @param subscriptionId the subscriptionId value. * @return the service client itself @@ -340,6 +340,19 @@ public WorkbooksInner workbooks() { return this.workbooks; } + /** + * The MyWorkbooksInner object to access its operations. + */ + private MyWorkbooksInner myWorkbooks; + + /** + * Gets the MyWorkbooksInner object to access its operations. + * @return the MyWorkbooksInner object. + */ + public MyWorkbooksInner myWorkbooks() { + return this.myWorkbooks; + } + /** * Initializes an instance of ApplicationInsightsManagementClient client. * @@ -391,6 +404,7 @@ protected void initialize() { this.webTests = new WebTestsInner(restClient().retrofit(), this); this.analyticsItems = new AnalyticsItemsInner(restClient().retrofit(), this); this.workbooks = new WorkbooksInner(restClient().retrofit(), this); + this.myWorkbooks = new MyWorkbooksInner(restClient().retrofit(), this); this.azureClient = new AzureClient(this); } @@ -401,6 +415,6 @@ protected void initialize() { */ @Override public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "ApplicationInsightsManagementClient", "2015-05-01"); + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "ApplicationInsightsManagementClient", "2015-05-01"); } } diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentAvailableFeaturesInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentAvailableFeaturesInner.java index 9f313fbff38e2..8e272a5e65790 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentAvailableFeaturesInner.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentAvailableFeaturesInner.java @@ -60,7 +60,7 @@ interface ComponentAvailableFeaturesService { /** * Returns all available features of the application insights component. * - * @param resourceGroupName The name of the 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 CloudException thrown if the request is rejected by server @@ -74,7 +74,7 @@ public ApplicationInsightsComponentAvailableFeaturesInner get(String resourceGro /** * Returns all available features of the application insights component. * - * @param resourceGroupName The name of the 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -87,7 +87,7 @@ public ServiceFuture getAsyn /** * Returns all available features of the application insights component. * - * @param resourceGroupName The name of the 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 * @return the observable to the ApplicationInsightsComponentAvailableFeaturesInner object @@ -104,7 +104,7 @@ public ApplicationInsightsComponentAvailableFeaturesInner call(ServiceResponse getAsync( /** * Returns current billing features for an Application Insights component. * - * @param resourceGroupName The name of the 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 * @return the observable to the ApplicationInsightsComponentBillingFeaturesInner object @@ -111,7 +111,7 @@ public ApplicationInsightsComponentBillingFeaturesInner call(ServiceResponse getDel /** * Update current billing features for an Application Insights component. * - * @param resourceGroupName The name of the 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 billingFeaturesProperties Properties that need to be specified to update billing features for an Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -168,7 +168,7 @@ public ApplicationInsightsComponentBillingFeaturesInner update(String resourceGr /** * Update current billing features for an Application Insights component. * - * @param resourceGroupName The name of the 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 billingFeaturesProperties Properties that need to be specified to update billing features for an Application Insights component. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -182,7 +182,7 @@ public ServiceFuture updateAsy /** * Update current billing features for an Application Insights component. * - * @param resourceGroupName The name of the 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 billingFeaturesProperties Properties that need to be specified to update billing features for an Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -200,7 +200,7 @@ public ApplicationInsightsComponentBillingFeaturesInner call(ServiceResponse getAs } /** - * Returns feature capabilites of the application insights component. + * Returns feature capabilities of the application insights component. * - * @param resourceGroupName The name of the 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 * @return the observable to the ApplicationInsightsComponentFeatureCapabilitiesInner object @@ -102,9 +102,9 @@ public ApplicationInsightsComponentFeatureCapabilitiesInner call(ServiceResponse } /** - * Returns feature capabilites of the application insights component. + * Returns feature capabilities of the application insights component. * - * @param resourceGroupName The name of the 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 * @return the observable to the ApplicationInsightsComponentFeatureCapabilitiesInner object diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentQuotaStatusInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentQuotaStatusInner.java index e17c45893b818..c9590d977a7e2 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentQuotaStatusInner.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentQuotaStatusInner.java @@ -60,7 +60,7 @@ interface ComponentQuotaStatusService { /** * Returns daily data volume cap (quota) status for an Application Insights component. * - * @param resourceGroupName The name of the 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 CloudException thrown if the request is rejected by server @@ -74,7 +74,7 @@ public ApplicationInsightsComponentQuotaStatusInner get(String resourceGroupName /** * Returns daily data volume cap (quota) status for an Application Insights component. * - * @param resourceGroupName The name of the 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -87,7 +87,7 @@ public ServiceFuture getAsync(Stri /** * Returns daily data volume cap (quota) status for an Application Insights component. * - * @param resourceGroupName The name of the 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 * @return the observable to the ApplicationInsightsComponentQuotaStatusInner object @@ -104,7 +104,7 @@ public ApplicationInsightsComponentQuotaStatusInner call(ServiceResponse getComponentPurgeStatusRes public Observable getPurgeStatusAsync(String resourceGroupName, String resourceName, String purgeId) { ComponentsInner client = this.inner(); return client.getPurgeStatusAsync(resourceGroupName, resourceName, purgeId) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ComponentPurgeStatusResponse call(ComponentPurgeStatusResponseInner inner) { - return wrapComponentPurgeStatusResponseModel(inner); + public Observable call(ComponentPurgeStatusResponseInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ComponentPurgeStatusResponse)wrapComponentPurgeStatusResponseModel(inner)); + } } }); } diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentsInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentsInner.java index df6437a50ed0b..d17fb47a763ed 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentsInner.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentsInner.java @@ -221,7 +221,7 @@ private ServiceResponse> listDelegat /** * Gets a list of Application Insights components within a resource group. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -240,7 +240,7 @@ public Page nextPage(String nextPageLink) { /** * Gets a list of Application Insights components within a resource group. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -260,7 +260,7 @@ public Observable>> call /** * Gets a list of Application Insights components within a resource group. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<ApplicationInsightsComponentInner> object */ @@ -277,7 +277,7 @@ public Page call(ServiceResponse>> call /** * Gets a list of Application Insights components within a resource group. * - ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<ApplicationInsightsComponentInner> object wrapped in {@link ServiceResponse} if successful. */ @@ -336,7 +336,7 @@ private ServiceResponse> listByResou /** * Deletes an Application Insights component. * - * @param resourceGroupName The name of the 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 CloudException thrown if the request is rejected by server @@ -349,7 +349,7 @@ public void delete(String resourceGroupName, String resourceName) { /** * Deletes an Application Insights component. * - * @param resourceGroupName The name of the 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -362,7 +362,7 @@ public ServiceFuture deleteAsync(String resourceGroupName, String resource /** * Deletes an Application Insights component. * - * @param resourceGroupName The name of the 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 * @return the {@link ServiceResponse} object if successful. @@ -379,7 +379,7 @@ public Void call(ServiceResponse response) { /** * Deletes an Application Insights component. * - * @param resourceGroupName The name of the 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 * @return the {@link ServiceResponse} object if successful. @@ -422,7 +422,7 @@ private ServiceResponse deleteDelegate(Response response) th /** * Returns an Application Insights component. * - * @param resourceGroupName The name of the 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 CloudException thrown if the request is rejected by server @@ -436,7 +436,7 @@ public ApplicationInsightsComponentInner getByResourceGroup(String resourceGroup /** * Returns an Application Insights component. * - * @param resourceGroupName The name of the 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -449,7 +449,7 @@ public ServiceFuture getByResourceGroupAsync( /** * Returns an Application Insights component. * - * @param resourceGroupName The name of the 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 * @return the observable to the ApplicationInsightsComponentInner object @@ -466,7 +466,7 @@ public ApplicationInsightsComponentInner call(ServiceResponse getByResourceGroupDel /** * 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. + * @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 @@ -523,7 +523,7 @@ public ApplicationInsightsComponentInner createOrUpdate(String resourceGroupName /** * 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. + * @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 serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -537,7 +537,7 @@ public ServiceFuture createOrUpdateAsync(Stri /** * 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. + * @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 @@ -555,7 +555,7 @@ public ApplicationInsightsComponentInner call(ServiceResponse createOrUpdateDelegat /** * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. * - * @param resourceGroupName The name of the 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 CloudException thrown if the request is rejected by server @@ -616,7 +616,7 @@ public ApplicationInsightsComponentInner updateTags(String resourceGroupName, St /** * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. * - * @param resourceGroupName The name of the 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -629,7 +629,7 @@ public ServiceFuture updateTagsAsync(String r /** * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. * - * @param resourceGroupName The name of the 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 * @return the observable to the ApplicationInsightsComponentInner object @@ -646,7 +646,7 @@ public ApplicationInsightsComponentInner call(ServiceResponse> call(Respo /** * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. * - * @param resourceGroupName The name of the 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 tags Resource tags * @throws IllegalArgumentException thrown if parameters fail the validation @@ -699,7 +699,7 @@ public ApplicationInsightsComponentInner updateTags(String resourceGroupName, St /** * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. * - * @param resourceGroupName The name of the 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 tags Resource tags * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -713,7 +713,7 @@ public ServiceFuture updateTagsAsync(String r /** * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. * - * @param resourceGroupName The name of the 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 tags Resource tags * @throws IllegalArgumentException thrown if parameters fail the validation @@ -731,7 +731,7 @@ public ApplicationInsightsComponentInner call(ServiceResponse updateTagsDelegate(Re /** * 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. + * @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 @@ -791,8 +792,9 @@ public ComponentPurgeResponseInner purge(String resourceGroupName, String resour /** * 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. + * @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 serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -805,8 +807,9 @@ public ServiceFuture purgeAsync(String resourceGrou /** * 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. + * @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 @@ -823,8 +826,9 @@ public ComponentPurgeResponseInner call(ServiceResponse purgeDelegate(Response getPurgeStatusAsync(Stri /** * Get status for an ongoing purge operation. * - * @param resourceGroupName The name of the 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 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 @@ -918,7 +922,7 @@ public ComponentPurgeStatusResponseInner call(ServiceResponse list(String re /** * Gets a list of Continuous Export configuration of an Application Insights component. * - * @param resourceGroupName The name of the 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -110,7 +110,7 @@ public ServiceFuture> /** * Gets a list of Continuous Export configuration of an Application Insights component. * - * @param resourceGroupName The name of the 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 * @return the observable to the List<ApplicationInsightsComponentExportConfigurationInner> object @@ -127,7 +127,7 @@ public List call(ServiceRe /** * Gets a list of Continuous Export configuration of an Application Insights component. * - * @param resourceGroupName The name of the 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 * @return the observable to the List<ApplicationInsightsComponentExportConfigurationInner> object @@ -169,7 +169,7 @@ private ServiceResponse create(String /** * Create a Continuous Export configuration of an Application Insights component. * - * @param resourceGroupName The name of the 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 exportProperties Properties that need to be specified to create a Continuous Export configuration of a Application Insights component. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -198,7 +198,7 @@ public ServiceFuture> /** * Create a Continuous Export configuration of an Application Insights component. * - * @param resourceGroupName The name of the 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 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 @@ -216,7 +216,7 @@ public List call(ServiceRe /** * Create a Continuous Export configuration of an Application Insights component. * - * @param resourceGroupName The name of the 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 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 @@ -263,7 +263,7 @@ private ServiceResponse delet /** * Delete a Continuous Export configuration of an Application Insights component. * - * @param resourceGroupName The name of the 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 exportId The Continuous Export configuration ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -310,7 +310,7 @@ public ApplicationInsightsComponentExportConfigurationInner call(ServiceResponse /** * Delete a Continuous Export configuration of an Application Insights component. * - * @param resourceGroupName The name of the 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 exportId The Continuous Export configuration ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -356,7 +356,7 @@ private ServiceResponse de /** * Get the Continuous Export configuration for this export id. * - * @param resourceGroupName The name of the 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 exportId The Continuous Export configuration ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -371,7 +371,7 @@ public ApplicationInsightsComponentExportConfigurationInner get(String resourceG /** * Get the Continuous Export configuration for this export id. * - * @param resourceGroupName The name of the 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 exportId The Continuous Export configuration ID. This is unique within a Application Insights component. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -385,7 +385,7 @@ public ServiceFuture getAs /** * Get the Continuous Export configuration for this export id. * - * @param resourceGroupName The name of the 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 exportId The Continuous Export configuration ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -403,7 +403,7 @@ public ApplicationInsightsComponentExportConfigurationInner call(ServiceResponse /** * Get the Continuous Export configuration for this export id. * - * @param resourceGroupName The name of the 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 exportId The Continuous Export configuration ID. This is unique within a Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -449,7 +449,7 @@ private ServiceResponse ge /** * Update the Continuous Export configuration for this export id. * - * @param resourceGroupName The name of the 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 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. @@ -465,7 +465,7 @@ public ApplicationInsightsComponentExportConfigurationInner update(String resour /** * Update the Continuous Export configuration for this export id. * - * @param resourceGroupName The name of the 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 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. @@ -480,7 +480,7 @@ public ServiceFuture updat /** * Update the Continuous Export configuration for this export id. * - * @param resourceGroupName The name of the 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 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. @@ -499,7 +499,7 @@ public ApplicationInsightsComponentExportConfigurationInner call(ServiceResponse /** * Update the Continuous Export configuration for this export id. * - * @param resourceGroupName The name of the 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 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. diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/FavoritesImpl.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/FavoritesImpl.java index a7bc7383b16ea..77467137bdf13 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/FavoritesImpl.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/FavoritesImpl.java @@ -64,10 +64,14 @@ public ApplicationInsightsComponentFavorite call(ApplicationInsightsComponentFav public Observable getAsync(String resourceGroupName, String resourceName, String favoriteId) { FavoritesInner client = this.inner(); return client.getAsync(resourceGroupName, resourceName, favoriteId) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ApplicationInsightsComponentFavorite call(ApplicationInsightsComponentFavoriteInner inner) { - return wrapModel(inner); + public Observable call(ApplicationInsightsComponentFavoriteInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ApplicationInsightsComponentFavorite)wrapModel(inner)); + } } }); } diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/FavoritesInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/FavoritesInner.java index 6e30345404035..b5c5470aae6a6 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/FavoritesInner.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/FavoritesInner.java @@ -85,7 +85,7 @@ interface FavoritesService { /** * Gets a list of favorites defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 CloudException thrown if the request is rejected by server @@ -99,7 +99,7 @@ public List list(String resourceGroup /** * Gets a list of favorites defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -112,7 +112,7 @@ public ServiceFuture> listAsync( /** * Gets a list of favorites defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 * @return the observable to the List<ApplicationInsightsComponentFavoriteInner> object @@ -129,7 +129,7 @@ public List call(ServiceResponse list(String resourceGroup /** * Gets a list of favorites defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 favoriteType The type of favorite. Value can be either shared or user. Possible values include: 'shared', 'user' * @param sourceType Source type of favorite to return. When left out, the source type defaults to 'other' (not present in this enum). Possible values include: 'retention', 'notebook', 'sessions', 'events', 'userflows', 'funnel', 'impact', 'segmentation' @@ -204,7 +204,7 @@ public ServiceFuture> listAsync( /** * Gets a list of favorites defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 favoriteType The type of favorite. Value can be either shared or user. Possible values include: 'shared', 'user' * @param sourceType Source type of favorite to return. When left out, the source type defaults to 'other' (not present in this enum). Possible values include: 'retention', 'notebook', 'sessions', 'events', 'userflows', 'funnel', 'impact', 'segmentation' @@ -225,7 +225,7 @@ public List call(ServiceResponse> listDel /** * Get a single favorite by its FavoriteId, defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 favoriteId The Id of a specific favorite defined in the Application Insights component * @throws IllegalArgumentException thrown if parameters fail the validation @@ -288,7 +288,7 @@ public ApplicationInsightsComponentFavoriteInner get(String resourceGroupName, S /** * Get a single favorite by its FavoriteId, defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 favoriteId The Id of a specific favorite defined in the Application Insights component * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -302,7 +302,7 @@ public ServiceFuture getAsync(String /** * Get a single favorite by its FavoriteId, defined within an Application Insights component. * - * @param resourceGroupName The name of the 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 favoriteId The Id of a specific favorite defined in the Application Insights component * @throws IllegalArgumentException thrown if parameters fail the validation @@ -320,7 +320,7 @@ public ApplicationInsightsComponentFavoriteInner call(ServiceResponse getDelegate(R /** * Adds a new favorites to an Application Insights component. * - * @param resourceGroupName The name of the 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 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. @@ -382,7 +382,7 @@ public ApplicationInsightsComponentFavoriteInner add(String resourceGroupName, S /** * Adds a new favorites to an Application Insights component. * - * @param resourceGroupName The name of the 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 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. @@ -397,7 +397,7 @@ public ServiceFuture addAsync(String /** * Adds a new favorites to an Application Insights component. * - * @param resourceGroupName The name of the 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 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. @@ -416,7 +416,7 @@ public ApplicationInsightsComponentFavoriteInner call(ServiceResponse addDelegate(R /** * Updates a favorite that has already been added to an Application Insights component. * - * @param resourceGroupName The name of the 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 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. @@ -483,7 +483,7 @@ public ApplicationInsightsComponentFavoriteInner update(String resourceGroupName /** * Updates a favorite that has already been added to an Application Insights component. * - * @param resourceGroupName The name of the 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 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. @@ -498,7 +498,7 @@ public ServiceFuture updateAsync(Stri /** * Updates a favorite that has already been added to an Application Insights component. * - * @param resourceGroupName The name of the 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 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. @@ -517,7 +517,7 @@ public ApplicationInsightsComponentFavoriteInner call(ServiceResponse updateDelegat /** * Remove a favorite that is associated to an Application Insights component. * - * @param resourceGroupName The name of the 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 favoriteId The Id of a specific favorite defined in the Application Insights component * @throws IllegalArgumentException thrown if parameters fail the validation @@ -582,7 +582,7 @@ public void delete(String resourceGroupName, String resourceName, String favorit /** * Remove a favorite that is associated to an Application Insights component. * - * @param resourceGroupName The name of the 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 favoriteId The Id of a specific favorite defined in the Application Insights component * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -596,7 +596,7 @@ public ServiceFuture deleteAsync(String resourceGroupName, String resource /** * Remove a favorite that is associated to an Application Insights component. * - * @param resourceGroupName The name of the 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 favoriteId The Id of a specific favorite defined in the Application Insights component * @throws IllegalArgumentException thrown if parameters fail the validation @@ -614,7 +614,7 @@ public Void call(ServiceResponse response) { /** * Remove a favorite that is associated to an Application Insights component. * - * @param resourceGroupName The name of the 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 favoriteId The Id of a specific favorite defined in the Application Insights component * @throws IllegalArgumentException thrown if parameters fail the validation diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/InsightsManager.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/InsightsManager.java index 51ba5cb4ced8f..51e3e565a076d 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/InsightsManager.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/InsightsManager.java @@ -32,6 +32,7 @@ import com.microsoft.azure.management.applicationinsights.v2015_05_01.WebTests; import com.microsoft.azure.management.applicationinsights.v2015_05_01.AnalyticsItems; import com.microsoft.azure.management.applicationinsights.v2015_05_01.Workbooks; +import com.microsoft.azure.management.applicationinsights.v2015_05_01.MyWorkbooks; import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; import com.microsoft.azure.arm.resources.implementation.ManagerCore; @@ -55,6 +56,7 @@ public final class InsightsManager extends ManagerCore implements MyWorkbook, MyWorkbook.Definition, MyWorkbook.Update { + MyWorkbookImpl(String name, MyWorkbookInner inner, InsightsManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + MyWorkbooksInner client = this.manager().inner().myWorkbooks(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + MyWorkbooksInner client = this.manager().inner().myWorkbooks(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + MyWorkbooksInner client = this.manager().inner().myWorkbooks(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String category() { + return this.inner().category(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public SharedTypeKind kind() { + return this.inner().kind(); + } + + @Override + public List myWorkbookTags() { + return this.inner().myWorkbookTags(); + } + + @Override + public String serializedData() { + return this.inner().serializedData(); + } + + @Override + public String sourceId() { + return this.inner().sourceId(); + } + + @Override + public String timeModified() { + return this.inner().timeModified(); + } + + @Override + public String userId() { + return this.inner().userId(); + } + + @Override + public String version() { + return this.inner().version(); + } + + @Override + public MyWorkbookImpl withCategory(String category) { + this.inner().withCategory(category); + return this; + } + + @Override + public MyWorkbookImpl withDisplayName(String displayName) { + this.inner().withDisplayName(displayName); + return this; + } + + @Override + public MyWorkbookImpl withSerializedData(String serializedData) { + this.inner().withSerializedData(serializedData); + return this; + } + + @Override + public MyWorkbookImpl withKind(SharedTypeKind kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public MyWorkbookImpl withMyWorkbookTags(List myWorkbookTags) { + this.inner().withMyWorkbookTags(myWorkbookTags); + return this; + } + + @Override + public MyWorkbookImpl withSourceId(String sourceId) { + this.inner().withSourceId(sourceId); + return this; + } + + @Override + public MyWorkbookImpl withVersion(String version) { + this.inner().withVersion(version); + return this; + } + +} diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/MyWorkbookInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/MyWorkbookInner.java new file mode 100644 index 0000000000000..62e9fe5631272 --- /dev/null +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/MyWorkbookInner.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.applicationinsights.v2015_05_01.implementation; + +import com.microsoft.azure.management.applicationinsights.v2015_05_01.SharedTypeKind; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.applicationinsights.v2015_05_01.MyWorkbookResource; + +/** + * An Application Insights private workbook definition. + */ +@JsonFlatten +public class MyWorkbookInner extends MyWorkbookResource { + /** + * The kind of workbook. Choices are user and shared. Possible values + * include: 'user', 'shared'. + */ + @JsonProperty(value = "kind") + private SharedTypeKind kind; + + /** + * The user-defined name of the private workbook. + */ + @JsonProperty(value = "properties.displayName", required = true) + private String displayName; + + /** + * Configuration of this particular private workbook. Configuration data is + * a string containing valid JSON. + */ + @JsonProperty(value = "properties.serializedData", required = true) + 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", required = true) + private String category; + + /** + * A list of 0 or more tags that are associated with this private workbook + * definition. + */ + @JsonProperty(value = "properties.tags") + private List myWorkbookTags; + + /** + * 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; + + /** + * Get the kind of workbook. Choices are user and shared. Possible values include: 'user', 'shared'. + * + * @return the kind value + */ + public SharedTypeKind kind() { + return this.kind; + } + + /** + * Set the kind of workbook. Choices are user and shared. Possible values include: 'user', 'shared'. + * + * @param kind the kind value to set + * @return the MyWorkbookInner object itself. + */ + public MyWorkbookInner withKind(SharedTypeKind kind) { + this.kind = kind; + return this; + } + + /** + * Get the user-defined name of the private workbook. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set 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 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 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 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 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 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 workbook category, as defined by the user at creation time. + * + * @return the category value + */ + public String category() { + return this.category; + } + + /** + * Set 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 a list of 0 or more tags that are associated with this private workbook definition. + * + * @return the myWorkbookTags value + */ + public List myWorkbookTags() { + return this.myWorkbookTags; + } + + /** + * Set a list of 0 or more tags that are associated with this private workbook definition. + * + * @param myWorkbookTags the myWorkbookTags value to set + * @return the MyWorkbookInner object itself. + */ + public MyWorkbookInner withMyWorkbookTags(List myWorkbookTags) { + this.myWorkbookTags = myWorkbookTags; + return this; + } + + /** + * Get unique user id of the specific user that owns this private workbook. + * + * @return the userId value + */ + public String userId() { + return this.userId; + } + + /** + * Get optional resourceId for a source resource. + * + * @return the sourceId value + */ + public String sourceId() { + return this.sourceId; + } + + /** + * Set 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; + } + +} diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/MyWorkbooksImpl.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/MyWorkbooksImpl.java new file mode 100644 index 0000000000000..512e10f96fe3a --- /dev/null +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/MyWorkbooksImpl.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.applicationinsights.v2015_05_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.applicationinsights.v2015_05_01.MyWorkbooks; +import com.microsoft.azure.management.applicationinsights.v2015_05_01.MyWorkbook; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.applicationinsights.v2015_05_01.CategoryType; + +class MyWorkbooksImpl extends GroupableResourcesCoreImpl implements MyWorkbooks { + protected MyWorkbooksImpl(InsightsManager manager) { + super(manager.inner().myWorkbooks(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + MyWorkbooksInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + MyWorkbooksInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public MyWorkbookImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName, CategoryType category) { + MyWorkbooksInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName, category) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(Page innerPage) { + return Observable.from(innerPage.items()); + } + }) + .map(new Func1() { + @Override + public MyWorkbook call(MyWorkbookInner inner) { + return new MyWorkbookImpl(inner.name(), inner, manager()); + } + }); + } + + @Override + public Observable listAsync(CategoryType category) { + MyWorkbooksInner client = this.inner(); + return client.listAsync(category) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(Page innerPage) { + return Observable.from(innerPage.items()); + } + }) + .map(new Func1() { + @Override + public MyWorkbook call(MyWorkbookInner inner) { + return new MyWorkbookImpl(inner.name(), inner, manager()); + } + }); + } + + @Override + protected MyWorkbookImpl wrapModel(MyWorkbookInner inner) { + return new MyWorkbookImpl(inner.name(), inner, manager()); + } + + @Override + protected MyWorkbookImpl wrapModel(String name) { + return new MyWorkbookImpl(name, new MyWorkbookInner(), this.manager()); + } + +} diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/MyWorkbooksInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/MyWorkbooksInner.java new file mode 100644 index 0000000000000..76f45c2e421e9 --- /dev/null +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/MyWorkbooksInner.java @@ -0,0 +1,831 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.applicationinsights.v2015_05_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.applicationinsights.v2015_05_01.CategoryType; +import com.microsoft.azure.management.applicationinsights.v2015_05_01.MyWorkbookErrorException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.CollectionFormat; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in MyWorkbooks. + */ +public class MyWorkbooksInner implements InnerSupportsGet, InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private MyWorkbooksService service; + /** The service client containing this operation class. */ + private ApplicationInsightsManagementClientImpl client; + + /** + * Initializes an instance of MyWorkbooksInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public MyWorkbooksInner(Retrofit retrofit, ApplicationInsightsManagementClientImpl client) { + this.service = retrofit.create(MyWorkbooksService.class); + this.client = client; + } + + /** + * The interface defining all the services for MyWorkbooks to be + * used by Retrofit to perform actually REST calls. + */ + interface MyWorkbooksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.applicationinsights.v2015_05_01.MyWorkbooks listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("category") CategoryType category, @Query("tags") String tags, @Query("canFetchContent") Boolean canFetchContent, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.applicationinsights.v2015_05_01.MyWorkbooks list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Insights/myWorkbooks") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("category") CategoryType category, @Query("tags") String tags, @Query("canFetchContent") Boolean canFetchContent, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.applicationinsights.v2015_05_01.MyWorkbooks getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.applicationinsights.v2015_05_01.MyWorkbooks delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.applicationinsights.v2015_05_01.MyWorkbooks createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body MyWorkbookInner workbookProperties, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.applicationinsights.v2015_05_01.MyWorkbooks update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body MyWorkbookInner workbookProperties, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * 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. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @return the PagedList object if successful. + */ + public PagedList listByResourceGroup(String resourceGroupName, CategoryType category) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(listByResourceGroupWithServiceResponseAsync(resourceGroupName, category).toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return 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. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(String resourceGroupName, CategoryType category, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByResourceGroupWithServiceResponseAsync(resourceGroupName, category), serviceCallback); + } + + /** + * 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. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @return the observable to the List<MyWorkbookInner> object + */ + public Observable> listByResourceGroupAsync(String resourceGroupName, CategoryType category) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, category).map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * 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. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @return the observable to the List<MyWorkbookInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName, CategoryType category) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (category == null) { + throw new IllegalArgumentException("Parameter category is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final List tags = null; + final Boolean canFetchContent = null; + String tagsConverted = this.client.serializerAdapter().serializeList(tags, CollectionFormat.CSV); + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, category, tagsConverted, canFetchContent, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * 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. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @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. + * @return the PagedList object if successful. + */ + public PagedList listByResourceGroup(String resourceGroupName, CategoryType category, List tags, Boolean canFetchContent) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(listByResourceGroupWithServiceResponseAsync(resourceGroupName, category, tags, canFetchContent).toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return 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. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(String resourceGroupName, CategoryType category, List tags, Boolean canFetchContent, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByResourceGroupWithServiceResponseAsync(resourceGroupName, category, tags, canFetchContent), serviceCallback); + } + + /** + * 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. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @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. + * @return the observable to the List<MyWorkbookInner> object + */ + public Observable> listByResourceGroupAsync(String resourceGroupName, CategoryType category, List tags, Boolean canFetchContent) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, category, tags, canFetchContent).map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * 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. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @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. + * @return the observable to the List<MyWorkbookInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName, CategoryType category, List tags, Boolean canFetchContent) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (category == null) { + throw new IllegalArgumentException("Parameter category is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(tags); + String tagsConverted = this.client.serializerAdapter().serializeList(tags, CollectionFormat.CSV); + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, category, tagsConverted, canFetchContent, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws MyWorkbookErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., MyWorkbookErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(MyWorkbookErrorException.class) + .build(response); + } + + /** + * Get all private workbooks defined within a specified subscription and category. + * + * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @return the PagedList object if successful. + */ + public PagedList list(CategoryType category) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(listWithServiceResponseAsync(category).toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * Get all private workbooks defined within a specified subscription and category. + * + * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(CategoryType category, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(category), serviceCallback); + } + + /** + * Get all private workbooks defined within a specified subscription and category. + * + * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @return the observable to the List<MyWorkbookInner> object + */ + public Observable> listAsync(CategoryType category) { + return listWithServiceResponseAsync(category).map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * Get all private workbooks defined within a specified subscription and category. + * + * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @return the observable to the List<MyWorkbookInner> object + */ + public Observable>> listWithServiceResponseAsync(CategoryType category) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (category == null) { + throw new IllegalArgumentException("Parameter category is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final List tags = null; + final Boolean canFetchContent = null; + String tagsConverted = this.client.serializerAdapter().serializeList(tags, CollectionFormat.CSV); + return service.list(this.client.subscriptionId(), category, tagsConverted, canFetchContent, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get all private workbooks defined within a specified subscription and category. + * + * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @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. + * @return the PagedList object if successful. + */ + public PagedList list(CategoryType category, List tags, Boolean canFetchContent) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(listWithServiceResponseAsync(category, tags, canFetchContent).toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * Get all private workbooks defined within a specified subscription and category. + * + * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(CategoryType category, List tags, Boolean canFetchContent, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(category, tags, canFetchContent), serviceCallback); + } + + /** + * Get all private workbooks defined within a specified subscription and category. + * + * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @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. + * @return the observable to the List<MyWorkbookInner> object + */ + public Observable> listAsync(CategoryType category, List tags, Boolean canFetchContent) { + return listWithServiceResponseAsync(category, tags, canFetchContent).map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * Get all private workbooks defined within a specified subscription and category. + * + * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' + * @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. + * @return the observable to the List<MyWorkbookInner> object + */ + public Observable>> listWithServiceResponseAsync(CategoryType category, List tags, Boolean canFetchContent) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (category == null) { + throw new IllegalArgumentException("Parameter category is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(tags); + String tagsConverted = this.client.serializerAdapter().serializeList(tags, CollectionFormat.CSV); + return service.list(this.client.subscriptionId(), category, tagsConverted, canFetchContent, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws MyWorkbookErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., MyWorkbookErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(MyWorkbookErrorException.class) + .build(response); + } + + /** + * 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 MyWorkbookErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MyWorkbookInner object if successful. + */ + public MyWorkbookInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * 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 + * @return the observable to the MyWorkbookInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, MyWorkbookInner>() { + @Override + public MyWorkbookInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the MyWorkbookInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws MyWorkbookErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(MyWorkbookErrorException.class) + .build(response); + } + + /** + * 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 MyWorkbookErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String resourceName) { + deleteWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * 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 + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String resourceName) { + return deleteWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws MyWorkbookErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(MyWorkbookErrorException.class) + .build(response); + } + + /** + * 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 MyWorkbookErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MyWorkbookInner object if successful. + */ + public MyWorkbookInner createOrUpdate(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, workbookProperties).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, workbookProperties), serviceCallback); + } + + /** + * 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 + * @return the observable to the MyWorkbookInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, workbookProperties).map(new Func1, MyWorkbookInner>() { + @Override + public MyWorkbookInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the MyWorkbookInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workbookProperties == null) { + throw new IllegalArgumentException("Parameter workbookProperties is required and cannot be null."); + } + Validator.validate(workbookProperties); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), workbookProperties, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws MyWorkbookErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(MyWorkbookErrorException.class) + .build(response); + } + + /** + * 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 MyWorkbookErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MyWorkbookInner object if successful. + */ + public MyWorkbookInner update(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { + return updateWithServiceResponseAsync(resourceGroupName, resourceName, workbookProperties).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, resourceName, workbookProperties), serviceCallback); + } + + /** + * 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 + * @return the observable to the MyWorkbookInner object + */ + public Observable updateAsync(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { + return updateWithServiceResponseAsync(resourceGroupName, resourceName, workbookProperties).map(new Func1, MyWorkbookInner>() { + @Override + public MyWorkbookInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the MyWorkbookInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workbookProperties == null) { + throw new IllegalArgumentException("Parameter workbookProperties is required and cannot be null."); + } + Validator.validate(workbookProperties); + return service.update(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), workbookProperties, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws MyWorkbookErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(MyWorkbookErrorException.class) + .build(response); + } + +} diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ProactiveDetectionConfigurationsImpl.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ProactiveDetectionConfigurationsImpl.java index 50b4fc0fbe1b9..681befbcaff1d 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ProactiveDetectionConfigurationsImpl.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ProactiveDetectionConfigurationsImpl.java @@ -54,10 +54,14 @@ public ApplicationInsightsComponentProactiveDetectionConfiguration call(Applicat public Observable getAsync(String resourceGroupName, String resourceName, String configurationId) { ProactiveDetectionConfigurationsInner client = this.inner(); return client.getAsync(resourceGroupName, resourceName, configurationId) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ApplicationInsightsComponentProactiveDetectionConfiguration call(ApplicationInsightsComponentProactiveDetectionConfigurationInner inner) { - return wrapModel(inner); + public Observable call(ApplicationInsightsComponentProactiveDetectionConfigurationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ApplicationInsightsComponentProactiveDetectionConfiguration)wrapModel(inner)); + } } }); } diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ProactiveDetectionConfigurationsInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ProactiveDetectionConfigurationsInner.java index 2d6064231d0a9..e6dfb0a838ece 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ProactiveDetectionConfigurationsInner.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ProactiveDetectionConfigurationsInner.java @@ -72,7 +72,7 @@ interface ProactiveDetectionConfigurationsService { /** * Gets a list of ProactiveDetection configurations of an Application Insights component. * - * @param resourceGroupName The name of the 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 CloudException thrown if the request is rejected by server @@ -86,7 +86,7 @@ public List li /** * Gets a list of ProactiveDetection configurations of an Application Insights component. * - * @param resourceGroupName The name of the 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -99,7 +99,7 @@ public ServiceFuture ca /** * Gets a list of ProactiveDetection configurations of an Application Insights component. * - * @param resourceGroupName The name of the 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 * @return the observable to the List<ApplicationInsightsComponentProactiveDetectionConfigurationInner> object @@ -158,7 +158,7 @@ private ServiceResponse list(String resour /** * Gets a list of web test locations available to this Application Insights component. * - * @param resourceGroupName The name of the 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -88,7 +88,7 @@ public ServiceFuture> lis /** * Gets a list of web test locations available to this Application Insights component. * - * @param resourceGroupName The name of the 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 * @return the observable to the List<ApplicationInsightsComponentWebTestLocationInner> object @@ -105,7 +105,7 @@ public List call(ServiceRespon /** * Gets a list of web test locations available to this Application Insights component. * - * @param resourceGroupName The name of the 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 * @return the observable to the List<ApplicationInsightsComponentWebTestLocationInner> object diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WebTestsInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WebTestsInner.java index 1e5b0c199442e..93d6d07a5a667 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WebTestsInner.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WebTestsInner.java @@ -112,7 +112,7 @@ interface WebTestsService { /** * Get all Application Insights web tests defined within a specified resource group. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -131,7 +131,7 @@ public Page nextPage(String nextPageLink) { /** * Get all Application Insights web tests defined within a specified resource group. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -151,7 +151,7 @@ public Observable>> call(String nextPageLink) /** * Get all Application Insights web tests defined within a specified resource group. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<WebTestInner> object */ @@ -168,7 +168,7 @@ public Page call(ServiceResponse> response) { /** * Get all Application Insights web tests defined within a specified resource group. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<WebTestInner> object */ @@ -189,7 +189,7 @@ public Observable>> call(ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<WebTestInner> object wrapped in {@link ServiceResponse} if successful. */ @@ -227,7 +227,7 @@ private ServiceResponse> listByResourceGroupDelegate(Resp /** * Get a specific Application Insights web test definition. * - * @param resourceGroupName The name of the resource group. + * @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 CloudException thrown if the request is rejected by server @@ -241,7 +241,7 @@ public WebTestInner getByResourceGroup(String resourceGroupName, String webTestN /** * Get a specific Application Insights web test definition. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -254,7 +254,7 @@ public ServiceFuture getByResourceGroupAsync(String resourceGroupN /** * Get a specific Application Insights web test definition. * - * @param resourceGroupName The name of the resource group. + * @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 * @return the observable to the WebTestInner object @@ -271,7 +271,7 @@ public WebTestInner call(ServiceResponse response) { /** * Get a specific Application Insights web test definition. * - * @param resourceGroupName The name of the resource group. + * @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 * @return the observable to the WebTestInner object @@ -313,7 +313,7 @@ private ServiceResponse getByResourceGroupDelegate(Response createOrUpdateAsync(String resourceGroupName, /** * Creates or updates an Application Insights web test definition. * - * @param resourceGroupName The name of the resource group. + * @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 @@ -360,7 +360,7 @@ public WebTestInner call(ServiceResponse response) { /** * Creates or updates an Application Insights web test definition. * - * @param resourceGroupName The name of the resource group. + * @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 @@ -407,7 +407,7 @@ private ServiceResponse createOrUpdateDelegate(Response updateTagsAsync(String resourceGroupName, Str /** * Creates or updates an Application Insights web test definition. * - * @param resourceGroupName The name of the resource group. + * @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 * @return the observable to the WebTestInner object @@ -451,7 +451,7 @@ public WebTestInner call(ServiceResponse response) { /** * Creates or updates an Application Insights web test definition. * - * @param resourceGroupName The name of the resource group. + * @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 * @return the observable to the WebTestInner object @@ -489,7 +489,7 @@ public Observable> call(Response res /** * Creates or updates an Application Insights web test definition. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param tags Resource tags * @throws IllegalArgumentException thrown if parameters fail the validation @@ -504,7 +504,7 @@ public WebTestInner updateTags(String resourceGroupName, String webTestName, Map /** * Creates or updates an Application Insights web test definition. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param tags Resource tags * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -518,7 +518,7 @@ public ServiceFuture updateTagsAsync(String resourceGroupName, Str /** * Creates or updates an Application Insights web test definition. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param tags Resource tags * @throws IllegalArgumentException thrown if parameters fail the validation @@ -536,7 +536,7 @@ public WebTestInner call(ServiceResponse response) { /** * Creates or updates an Application Insights web test definition. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param tags Resource tags * @throws IllegalArgumentException thrown if parameters fail the validation @@ -582,7 +582,7 @@ private ServiceResponse updateTagsDelegate(Response /** * Deletes an Application Insights web test. * - * @param resourceGroupName The name of the resource group. + * @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 CloudException thrown if the request is rejected by server @@ -595,7 +595,7 @@ public void delete(String resourceGroupName, String webTestName) { /** * Deletes an Application Insights web test. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param webTestName The name of the Application Insights webtest resource. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -608,7 +608,7 @@ public ServiceFuture deleteAsync(String resourceGroupName, String webTestN /** * Deletes an Application Insights web test. * - * @param resourceGroupName The name of the resource group. + * @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 * @return the {@link ServiceResponse} object if successful. @@ -625,7 +625,7 @@ public Void call(ServiceResponse response) { /** * Deletes an Application Insights web test. * - * @param resourceGroupName The name of the resource group. + * @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 * @return the {@link ServiceResponse} object if successful. @@ -666,7 +666,7 @@ private ServiceResponse deleteDelegate(Response response) th } /** - * Get all Application Insights web test alerts definitioned within a subscription. + * Get all Application Insights web test alerts definitions within a subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server @@ -684,7 +684,7 @@ public Page nextPage(String nextPageLink) { } /** - * Get all Application Insights web test alerts definitioned within a subscription. + * Get all Application Insights web test alerts definitions within a subscription. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -703,7 +703,7 @@ public Observable>> call(String nextPageLink) } /** - * Get all Application Insights web test alerts definitioned within a subscription. + * Get all Application Insights web test alerts definitions within a subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<WebTestInner> object @@ -719,7 +719,7 @@ public Page call(ServiceResponse> response) { } /** - * Get all Application Insights web test alerts definitioned within a subscription. + * Get all Application Insights web test alerts definitions within a subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<WebTestInner> object @@ -739,7 +739,7 @@ public Observable>> call(ServiceResponse> listDelegate(Response nextPage(String nextPageLink) { * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -817,7 +817,7 @@ public Observable>> call(String nextPageLink) * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<WebTestInner> object */ @@ -835,7 +835,7 @@ public Page call(ServiceResponse> response) { * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<WebTestInner> object */ @@ -857,7 +857,7 @@ public Observable>> call(ServiceResponse> * @param componentName The name of the Application Insights component resource. - ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<WebTestInner> object wrapped in {@link ServiceResponse} if successful. */ @@ -1007,7 +1007,7 @@ private ServiceResponse> listByResourceGroupNextDelegate( } /** - * Get all Application Insights web test alerts definitioned within a subscription. + * Get all Application Insights web test alerts definitions within a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1026,7 +1026,7 @@ public Page nextPage(String nextPageLink) { } /** - * Get all Application Insights web test alerts definitioned within a subscription. + * Get all Application Insights web test alerts definitions within a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -1047,7 +1047,7 @@ public Observable>> call(String nextPageLink) } /** - * Get all Application Insights web test alerts definitioned within a subscription. + * Get all Application Insights web test alerts definitions within a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1064,7 +1064,7 @@ public Page call(ServiceResponse> response) { } /** - * Get all Application Insights web test alerts definitioned within a subscription. + * Get all Application Insights web test alerts definitions within a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1085,7 +1085,7 @@ public Observable>> call(ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationImpl.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationImpl.java index f1415a72138c0..fc8a3fe0c37ea 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationImpl.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationImpl.java @@ -9,15 +9,22 @@ package com.microsoft.azure.management.applicationinsights.v2015_05_01.implementation; import com.microsoft.azure.management.applicationinsights.v2015_05_01.WorkItemConfiguration; -import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; import rx.Observable; -class WorkItemConfigurationImpl extends WrapperImpl implements WorkItemConfiguration { +class WorkItemConfigurationImpl extends IndexableRefreshableWrapperImpl implements WorkItemConfiguration { private final InsightsManager manager; + private String resourceGroupName; + private String resourceName; + private String workItemConfigId; WorkItemConfigurationImpl(WorkItemConfigurationInner inner, InsightsManager manager) { - super(inner); + super(null, inner); this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.resourceName = IdParsingUtils.getValueFromIdByName(inner.id(), "components"); + this.workItemConfigId = IdParsingUtils.getValueFromIdByName(inner.id(), "WorkItemConfigs"); } @Override @@ -25,6 +32,12 @@ public InsightsManager manager() { return this.manager; } + @Override + protected Observable getInnerAsync() { + WorkItemConfigurationsInner client = this.manager().inner().workItemConfigurations(); + return client.getItemAsync(this.resourceGroupName, this.resourceName, this.workItemConfigId); + } + @Override diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationsImpl.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationsImpl.java index 3766952f10ebb..97079cba405ec 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationsImpl.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationsImpl.java @@ -13,8 +13,8 @@ import com.microsoft.azure.management.applicationinsights.v2015_05_01.WorkItemConfigurations; import rx.Observable; import rx.functions.Func1; -import java.util.List; import com.microsoft.azure.management.applicationinsights.v2015_05_01.WorkItemConfiguration; +import java.util.List; import rx.Completable; import com.microsoft.azure.management.applicationinsights.v2015_05_01.WorkItemCreateConfiguration; @@ -34,6 +34,30 @@ private WorkItemConfigurationImpl wrapWorkItemConfigurationModel(WorkItemConfigu return new WorkItemConfigurationImpl(inner, manager()); } + private Observable getWorkItemConfigurationInnerUsingWorkItemConfigurationsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String resourceName = IdParsingUtils.getValueFromIdByName(id, "components"); + String workItemConfigId = IdParsingUtils.getValueFromIdByName(id, "WorkItemConfigs"); + WorkItemConfigurationsInner client = this.inner(); + return client.getItemAsync(resourceGroupName, resourceName, workItemConfigId); + } + + @Override + public Observable getItemAsync(String resourceGroupName, String resourceName, String workItemConfigId) { + WorkItemConfigurationsInner client = this.inner(); + return client.getItemAsync(resourceGroupName, resourceName, workItemConfigId) + .flatMap(new Func1>() { + @Override + public Observable call(WorkItemConfigurationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((WorkItemConfiguration)wrapWorkItemConfigurationModel(inner)); + } + } + }); + } + @Override public Observable listAsync(String resourceGroupName, String resourceName) { WorkItemConfigurationsInner client = this.inner(); @@ -58,6 +82,18 @@ public Completable deleteAsync(String resourceGroupName, String resourceName, St return client.deleteAsync(resourceGroupName, resourceName, workItemConfigId).toCompletable(); } + @Override + public Observable updateItemAsync(String resourceGroupName, String resourceName, String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties) { + WorkItemConfigurationsInner client = this.inner(); + return client.updateItemAsync(resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties) + .map(new Func1() { + @Override + public WorkItemConfiguration call(WorkItemConfigurationInner inner) { + return new WorkItemConfigurationImpl(inner, manager()); + } + }); + } + @Override public Observable createAsync(String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { WorkItemConfigurationsInner client = this.inner(); diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationsInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationsInner.java index 0dec79398e163..cd58db1def144 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationsInner.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationsInner.java @@ -25,6 +25,7 @@ import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; +import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.Query; @@ -74,12 +75,20 @@ interface WorkItemConfigurationsService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}", method = "DELETE", hasBody = true) Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("resourceName") String resourceName, @Path("workItemConfigId") String workItemConfigId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.applicationinsights.v2015_05_01.WorkItemConfigurations getItem" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}") + Observable> getItem(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("resourceName") String resourceName, @Path("workItemConfigId") String workItemConfigId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.applicationinsights.v2015_05_01.WorkItemConfigurations updateItem" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}") + Observable> updateItem(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("resourceName") String resourceName, @Path("workItemConfigId") String workItemConfigId, @Query("api-version") String apiVersion, @Body WorkItemCreateConfiguration workItemConfigurationProperties, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** * Gets the list work item configurations that exist for the application. * - * @param resourceGroupName The name of the 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 WorkItemConfigurationErrorException thrown if the request is rejected by server @@ -93,7 +102,7 @@ public List list(String resourceGroupName, String re /** * Gets the list work item configurations that exist for the application. * - * @param resourceGroupName The name of the 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -106,7 +115,7 @@ public ServiceFuture> listAsync(String resource /** * Gets the list work item configurations that exist for the application. * - * @param resourceGroupName The name of the 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 * @return the observable to the List<WorkItemConfigurationInner> object @@ -123,7 +132,7 @@ public List call(ServiceResponse> listDelegate(Resp /** * Create a work item configuration for an Application Insights component. * - * @param resourceGroupName The name of the 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 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 @@ -185,7 +194,7 @@ public WorkItemConfigurationInner create(String resourceGroupName, String resour /** * Create a work item configuration for an Application Insights component. * - * @param resourceGroupName The name of the 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 workItemConfigurationProperties Properties that need to be specified to create a work item configuration of a Application Insights component. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -199,7 +208,7 @@ public ServiceFuture createAsync(String resourceGrou /** * Create a work item configuration for an Application Insights component. * - * @param resourceGroupName The name of the 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 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 @@ -217,7 +226,7 @@ public WorkItemConfigurationInner call(ServiceResponse createDelegate(Response getDefaultAsync(String resource /** * Gets default work item configurations that exist for the application. * - * @param resourceGroupName The name of the 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 * @return the observable to the WorkItemConfigurationInner object @@ -308,7 +317,7 @@ public WorkItemConfigurationInner call(ServiceResponse> getDefaultWithSer @Override public Observable> call(Response response) { try { - ServiceResponse result = getDefaultDelegate(response); - ServiceResponse clientResponse = new ServiceResponse(result.body(), result.response()); + ServiceResponse clientResponse = getDefaultDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -349,62 +357,61 @@ private ServiceResponse getDefaultDelegate(Response< } /** - * Delete an workitem configuration of an Application Insights component. + * Delete a work item configuration of an Application Insights component. * - * @param resourceGroupName The name of the 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 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 CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the Object object if successful. */ - public Object delete(String resourceGroupName, String resourceName, String workItemConfigId) { - return deleteWithServiceResponseAsync(resourceGroupName, resourceName, workItemConfigId).toBlocking().single().body(); + public void delete(String resourceGroupName, String resourceName, String workItemConfigId) { + deleteWithServiceResponseAsync(resourceGroupName, resourceName, workItemConfigId).toBlocking().single().body(); } /** - * Delete an workitem configuration of an Application Insights component. + * Delete a work item configuration of an Application Insights component. * - * @param resourceGroupName The name of the 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 workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as defined in connector configuration * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String resourceName, String workItemConfigId, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String resourceName, String workItemConfigId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, resourceName, workItemConfigId), serviceCallback); } /** - * Delete an workitem configuration of an Application Insights component. + * Delete a work item configuration of an Application Insights component. * - * @param resourceGroupName The name of the 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 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 - * @return the observable to the Object object + * @return the {@link ServiceResponse} object if successful. */ - public Observable deleteAsync(String resourceGroupName, String resourceName, String workItemConfigId) { - return deleteWithServiceResponseAsync(resourceGroupName, resourceName, workItemConfigId).map(new Func1, Object>() { + public Observable deleteAsync(String resourceGroupName, String resourceName, String workItemConfigId) { + return deleteWithServiceResponseAsync(resourceGroupName, resourceName, workItemConfigId).map(new Func1, Void>() { @Override - public Object call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); } /** - * Delete an workitem configuration of an Application Insights component. + * Delete a work item configuration of an Application Insights component. * - * @param resourceGroupName The name of the 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 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 - * @return the observable to the Object object + * @return the {@link ServiceResponse} object if successful. */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String resourceName, String workItemConfigId) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String resourceName, String workItemConfigId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -421,11 +428,205 @@ public Observable> deleteWithServiceResponseAsync(String throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.delete(resourceGroupName, this.client.subscriptionId(), resourceName, workItemConfigId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WorkItemConfigurationInner object if successful. + */ + public WorkItemConfigurationInner getItem(String resourceGroupName, String resourceName, String workItemConfigId) { + return getItemWithServiceResponseAsync(resourceGroupName, resourceName, workItemConfigId).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getItemAsync(String resourceGroupName, String resourceName, String workItemConfigId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getItemWithServiceResponseAsync(resourceGroupName, resourceName, workItemConfigId), serviceCallback); + } + + /** + * 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 + * @return the observable to the WorkItemConfigurationInner object + */ + public Observable getItemAsync(String resourceGroupName, String resourceName, String workItemConfigId) { + return getItemWithServiceResponseAsync(resourceGroupName, resourceName, workItemConfigId).map(new Func1, WorkItemConfigurationInner>() { + @Override + public WorkItemConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the WorkItemConfigurationInner object + */ + public Observable> getItemWithServiceResponseAsync(String resourceGroupName, String resourceName, String workItemConfigId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (workItemConfigId == null) { + throw new IllegalArgumentException("Parameter workItemConfigId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getItem(resourceGroupName, this.client.subscriptionId(), resourceName, workItemConfigId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getItemDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getItemDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * 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 CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WorkItemConfigurationInner object if successful. + */ + public WorkItemConfigurationInner updateItem(String resourceGroupName, String resourceName, String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties) { + return updateItemWithServiceResponseAsync(resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateItemAsync(String resourceGroupName, String resourceName, String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateItemWithServiceResponseAsync(resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties), serviceCallback); + } + + /** + * 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 + * @return the observable to the WorkItemConfigurationInner object + */ + public Observable updateItemAsync(String resourceGroupName, String resourceName, String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties) { + return updateItemWithServiceResponseAsync(resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties).map(new Func1, WorkItemConfigurationInner>() { + @Override + public WorkItemConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the WorkItemConfigurationInner object + */ + public Observable> updateItemWithServiceResponseAsync(String resourceGroupName, String resourceName, String workItemConfigId, WorkItemCreateConfiguration workItemConfigurationProperties) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (workItemConfigId == null) { + throw new IllegalArgumentException("Parameter workItemConfigId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workItemConfigurationProperties == null) { + throw new IllegalArgumentException("Parameter workItemConfigurationProperties is required and cannot be null."); + } + Validator.validate(workItemConfigurationProperties); + return service.updateItem(resourceGroupName, this.client.subscriptionId(), resourceName, workItemConfigId, this.client.apiVersion(), workItemConfigurationProperties, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteDelegate(response); + ServiceResponse clientResponse = updateItemDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -434,9 +635,9 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse updateItemDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbookImpl.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbookImpl.java index b589ddee74b80..f617cbd803518 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbookImpl.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbookImpl.java @@ -4,65 +4,39 @@ * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * */ package com.microsoft.azure.management.applicationinsights.v2015_05_01.implementation; +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; import com.microsoft.azure.management.applicationinsights.v2015_05_01.Workbook; -import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; import rx.Observable; import com.microsoft.azure.management.applicationinsights.v2015_05_01.SharedTypeKind; import java.util.List; -import java.util.Map; - -class WorkbookImpl extends CreatableUpdatableImpl implements Workbook, Workbook.Definition, Workbook.Update { - private String resourceGroupName; - private String resourceName; - private final InsightsManager manager; - WorkbookImpl(String name, InsightsManager manager) { - super(name, new WorkbookInner()); - this.manager = manager; - // Set resource name - this.resourceName = name; - // - } - - WorkbookImpl(WorkbookInner inner, InsightsManager manager) { - super(inner.name(), inner); - this.manager = manager; - // Set resource name - this.resourceName = inner.name(); - // resource ancestor names - this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroup"); - this.resourceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workbooks"); - // - } - - @Override - public InsightsManager manager() { - return this.manager; +class WorkbookImpl extends GroupableResourceCoreImpl implements Workbook, Workbook.Definition, Workbook.Update { + WorkbookImpl(String name, WorkbookInner inner, InsightsManager manager) { + super(name, inner, manager); } @Override public Observable createResourceAsync() { WorkbooksInner client = this.manager().inner().workbooks(); - return client.createOrUpdateAsync(this.resourceGroupName, this.resourceName, this.inner()) + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) .map(innerToFluentMap(this)); } @Override public Observable updateResourceAsync() { WorkbooksInner client = this.manager().inner().workbooks(); - return client.updateAsync(this.resourceGroupName, this.resourceName, this.inner()) + return client.updateAsync(this.resourceGroupName(), this.name(), this.inner()) .map(innerToFluentMap(this)); } @Override protected Observable getInnerAsync() { WorkbooksInner client = this.manager().inner().workbooks(); - return null; // NOP getInnerAsync implementation as get is not supported + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); } @Override @@ -76,26 +50,11 @@ public String category() { return this.inner().category(); } - @Override - public String id() { - return this.inner().id(); - } - @Override public SharedTypeKind kind() { return this.inner().kind(); } - @Override - public String location() { - return this.inner().location(); - } - - @Override - public String name() { - return this.inner().name(); - } - @Override public String serializedData() { return this.inner().serializedData(); @@ -111,21 +70,11 @@ public String sourceResourceId() { return this.inner().sourceResourceId(); } - @Override - public Map tags() { - return this.inner().getTags(); - } - @Override public String timeModified() { return this.inner().timeModified(); } - @Override - public String type() { - return this.inner().type(); - } - @Override public String userId() { return this.inner().userId(); @@ -151,24 +100,12 @@ public List workbookTags() { return this.inner().workbookTags(); } - @Override - public WorkbookImpl withResourceGroupName(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - @Override public WorkbookImpl withCategory(String category) { this.inner().withCategory(category); return this; } - @Override - public WorkbookImpl withLocation(String location) { - this.inner().withLocation(location); - return this; - } - @Override public WorkbookImpl withSerializedData(String serializedData) { this.inner().withSerializedData(serializedData); @@ -211,12 +148,6 @@ public WorkbookImpl withSourceResourceId(String sourceResourceId) { return this; } - @Override - public WorkbookImpl withTags(Map tags) { - this.inner().withTags(tags); - return this; - } - @Override public WorkbookImpl withVersion(String version) { this.inner().withVersion(version); diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbooksImpl.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbooksImpl.java index 852f6cc23fdc5..7d3816edc2571 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbooksImpl.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbooksImpl.java @@ -4,79 +4,105 @@ * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * jkl + * def */ package com.microsoft.azure.management.applicationinsights.v2015_05_01.implementation; -import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; import com.microsoft.azure.management.applicationinsights.v2015_05_01.Workbooks; +import com.microsoft.azure.management.applicationinsights.v2015_05_01.Workbook; +import rx.Observable; import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; import rx.functions.Func1; -import rx.Observable; -import java.util.List; -import com.microsoft.azure.management.applicationinsights.v2015_05_01.Workbook; +import com.microsoft.azure.Page; import com.microsoft.azure.management.applicationinsights.v2015_05_01.CategoryType; -class WorkbooksImpl extends WrapperImpl implements Workbooks { - private final InsightsManager manager; +class WorkbooksImpl extends GroupableResourcesCoreImpl implements Workbooks { + protected WorkbooksImpl(InsightsManager manager) { + super(manager.inner().workbooks(), manager); + } - WorkbooksImpl(InsightsManager manager) { - super(manager.inner().workbooks()); - this.manager = manager; + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + WorkbooksInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); } - public InsightsManager manager() { - return this.manager; + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + WorkbooksInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); } @Override - public WorkbookImpl define(String name) { - return wrapModel(name); + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); } - private WorkbookImpl wrapModel(WorkbookInner inner) { - return new WorkbookImpl(inner, manager()); + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); } - private WorkbookImpl wrapModel(String name) { - return new WorkbookImpl(name, this.manager()); + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } } @Override - public Observable getAsync(String resourceGroupName, String resourceName) { - WorkbooksInner client = this.inner(); - return client.getAsync(resourceGroupName, resourceName) - .map(new Func1() { - @Override - public Workbook call(WorkbookInner inner) { - return new WorkbookImpl(inner, manager()); - } - }); + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); } @Override - public Completable deleteAsync(String resourceGroupName, String resourceName) { - WorkbooksInner client = this.inner(); - return client.deleteAsync(resourceGroupName, resourceName).toCompletable(); + public WorkbookImpl define(String name) { + return wrapModel(name); } @Override public Observable listByResourceGroupAsync(String resourceGroupName, CategoryType category) { WorkbooksInner client = this.inner(); return client.listByResourceGroupAsync(resourceGroupName, category) - .flatMap(new Func1, Observable>() { + .flatMap(new Func1, Observable>() { @Override - public Observable call(List innerList) { - return Observable.from(innerList); + public Observable call(Page innerPage) { + return Observable.from(innerPage.items()); } }) .map(new Func1() { @Override public Workbook call(WorkbookInner inner) { - return new WorkbookImpl(inner, manager()); + return new WorkbookImpl(inner.name(), inner, manager()); } }); } + @Override + protected WorkbookImpl wrapModel(WorkbookInner inner) { + return new WorkbookImpl(inner.name(), inner, manager()); + } + + @Override + protected WorkbookImpl wrapModel(String name) { + return new WorkbookImpl(name, new WorkbookInner(), this.manager()); + } + } diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbooksInner.java b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbooksInner.java index 211eba232243a..53cf1de81af20 100644 --- a/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbooksInner.java +++ b/sdk/applicationinsights/mgmt-v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbooksInner.java @@ -8,11 +8,14 @@ package com.microsoft.azure.management.applicationinsights.v2015_05_01.implementation; +import com.microsoft.azure.arm.collection.InnerSupportsGet; import com.microsoft.azure.arm.collection.InnerSupportsDelete; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.management.applicationinsights.v2015_05_01.CategoryType; import com.microsoft.azure.management.applicationinsights.v2015_05_01.WorkbookErrorException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; import com.microsoft.rest.CollectionFormat; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; @@ -38,7 +41,7 @@ * An instance of this class provides access to all the operations defined * in Workbooks. */ -public class WorkbooksInner implements InnerSupportsDelete { +public class WorkbooksInner implements InnerSupportsGet, InnerSupportsDelete { /** The Retrofit service to perform REST calls. */ private WorkbooksService service; /** The service client containing this operation class. */ @@ -61,23 +64,23 @@ public WorkbooksInner(Retrofit retrofit, ApplicationInsightsManagementClientImpl */ interface WorkbooksService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.applicationinsights.v2015_05_01.Workbooks listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks") Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("category") CategoryType category, @Query("tags") String tags, @Query("canFetchContent") Boolean canFetchContent, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.applicationinsights.v2015_05_01.Workbooks get" }) - @GET("subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}") - Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.applicationinsights.v2015_05_01.Workbooks getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.applicationinsights.v2015_05_01.Workbooks delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", method = "DELETE", hasBody = true) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}", method = "DELETE", hasBody = true) Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.applicationinsights.v2015_05_01.Workbooks createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}") Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body WorkbookInner workbookProperties, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.applicationinsights.v2015_05_01.Workbooks update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}") + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}") Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body WorkbookInner workbookProperties, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } @@ -85,24 +88,28 @@ interface WorkbooksService { /** * Get all Workbooks defined within a specified resource group and category. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' - * @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 List<WorkbookInner> object if successful. + * @return the PagedList object if successful. */ - public List listByResourceGroup(String resourceGroupName, CategoryType category) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName, category).toBlocking().single().body(); + public PagedList listByResourceGroup(String resourceGroupName, CategoryType category) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(listByResourceGroupWithServiceResponseAsync(resourceGroupName, category).toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; } /** * Get all Workbooks defined within a specified resource group and category. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ public ServiceFuture> listByResourceGroupAsync(String resourceGroupName, CategoryType category, final ServiceCallback> serviceCallback) { @@ -112,16 +119,17 @@ public ServiceFuture> listByResourceGroupAsync(String resour /** * Get all Workbooks defined within a specified resource group and category. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' - * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the List<WorkbookInner> object */ - public Observable> listByResourceGroupAsync(String resourceGroupName, CategoryType category) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName, category).map(new Func1>, List>() { + public Observable> listByResourceGroupAsync(String resourceGroupName, CategoryType category) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, category).map(new Func1>, Page>() { @Override - public List call(ServiceResponse> response) { - return response.body(); + public Page call(ServiceResponse> response) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(response.body()); + return page; } }); } @@ -129,9 +137,8 @@ public List call(ServiceResponse> response) { /** * Get all Workbooks defined within a specified resource group and category. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' - * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the List<WorkbookInner> object */ public Observable>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName, CategoryType category) { @@ -172,28 +179,32 @@ public Observable>> call(Response object if successful. */ - public List listByResourceGroup(String resourceGroupName, CategoryType category, List tags, Boolean canFetchContent) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName, category, tags, canFetchContent).toBlocking().single().body(); + public PagedList listByResourceGroup(String resourceGroupName, CategoryType category, List tags, Boolean canFetchContent) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(listByResourceGroupWithServiceResponseAsync(resourceGroupName, category, tags, canFetchContent).toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; } /** * Get all Workbooks defined within a specified resource group and category. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' * @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 serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ public ServiceFuture> listByResourceGroupAsync(String resourceGroupName, CategoryType category, List tags, Boolean canFetchContent, final ServiceCallback> serviceCallback) { @@ -203,18 +214,19 @@ public ServiceFuture> listByResourceGroupAsync(String resour /** * Get all Workbooks defined within a specified resource group and category. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' * @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 * @return the observable to the List<WorkbookInner> object */ - public Observable> listByResourceGroupAsync(String resourceGroupName, CategoryType category, List tags, Boolean canFetchContent) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName, category, tags, canFetchContent).map(new Func1>, List>() { + public Observable> listByResourceGroupAsync(String resourceGroupName, CategoryType category, List tags, Boolean canFetchContent) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, category, tags, canFetchContent).map(new Func1>, Page>() { @Override - public List call(ServiceResponse> response) { - return response.body(); + public Page call(ServiceResponse> response) { + PageImpl1 page = new PageImpl1<>(); + page.setItems(response.body()); + return page; } }); } @@ -222,11 +234,10 @@ public List call(ServiceResponse> response) { /** * Get all Workbooks defined within a specified resource group and category. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' * @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 * @return the observable to the List<WorkbookInner> object */ public Observable>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName, CategoryType category, List tags, Boolean canFetchContent) { @@ -273,40 +284,40 @@ private ServiceResponse> listByResourceGroupDelegate(Re /** * Get a single workbook by its resourceName. * - * @param resourceGroupName The name of the 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 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 WorkbookInner object if successful. */ - public WorkbookInner get(String resourceGroupName, String resourceName) { - return getWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + public WorkbookInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); } /** * Get a single workbook by its resourceName. * - * @param resourceGroupName The name of the 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture getAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); } /** * Get a single workbook by its resourceName. * - * @param resourceGroupName The name of the 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 * @return the observable to the WorkbookInner object */ - public Observable getAsync(String resourceGroupName, String resourceName) { - return getWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, WorkbookInner>() { + public Observable getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, WorkbookInner>() { @Override public WorkbookInner call(ServiceResponse response) { return response.body(); @@ -317,12 +328,12 @@ public WorkbookInner call(ServiceResponse response) { /** * Get a single workbook by its resourceName. * - * @param resourceGroupName The name of the 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 * @return the observable to the WorkbookInner object */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String resourceName) { + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String resourceName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -335,12 +346,12 @@ public Observable> getWithServiceResponseAsync(St if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } - return service.get(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = getDelegate(response); + ServiceResponse clientResponse = getByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -349,7 +360,7 @@ public Observable> call(Response re }); } - private ServiceResponse getDelegate(Response response) throws WorkbookErrorException, IOException, IllegalArgumentException { + private ServiceResponse getByResourceGroupDelegate(Response response) throws WorkbookErrorException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(WorkbookErrorException.class) @@ -359,7 +370,7 @@ private ServiceResponse getDelegate(Response respon /** * Delete a workbook. * - * @param resourceGroupName The name of the 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 WorkbookErrorException thrown if the request is rejected by server @@ -372,7 +383,7 @@ public void delete(String resourceGroupName, String resourceName) { /** * Delete a workbook. * - * @param resourceGroupName The name of the 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -385,7 +396,7 @@ public ServiceFuture deleteAsync(String resourceGroupName, String resource /** * Delete a workbook. * - * @param resourceGroupName The name of the 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 * @return the {@link ServiceResponse} object if successful. @@ -402,7 +413,7 @@ public Void call(ServiceResponse response) { /** * Delete a workbook. * - * @param resourceGroupName The name of the 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 * @return the {@link ServiceResponse} object if successful. @@ -445,7 +456,7 @@ private ServiceResponse deleteDelegate(Response response) th /** * Create a new workbook. * - * @param resourceGroupName The name of the 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 workbookProperties Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -460,7 +471,7 @@ public WorkbookInner createOrUpdate(String resourceGroupName, String resourceNam /** * Create a new workbook. * - * @param resourceGroupName The name of the 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 workbookProperties Properties that need to be specified to create a new workbook. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -474,7 +485,7 @@ public ServiceFuture createOrUpdateAsync(String resourceGroupName /** * Create a new workbook. * - * @param resourceGroupName The name of the 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 workbookProperties Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -492,7 +503,7 @@ public WorkbookInner call(ServiceResponse response) { /** * Create a new workbook. * - * @param resourceGroupName The name of the 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 workbookProperties Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -540,7 +551,7 @@ private ServiceResponse createOrUpdateDelegate(Response updateAsync(String resourceGroupName, String /** * Updates a workbook that has already been added. * - * @param resourceGroupName The name of the 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 workbookProperties Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -587,7 +598,7 @@ public WorkbookInner call(ServiceResponse response) { /** * Updates a workbook that has already been added. * - * @param resourceGroupName The name of the 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 workbookProperties Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation