diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/ActionGroupPatchBody.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/ActionGroupPatchBody.java new file mode 100644 index 00000000000..94328598223 --- /dev/null +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/ActionGroupPatchBody.java @@ -0,0 +1,73 @@ +/** + * 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.monitor; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * An action group object for the body of patch operations. + */ +@JsonFlatten +public class ActionGroupPatchBody { + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Indicates whether this action group is enabled. If an action group is + * not enabled, then none of its actions will be activated. + */ + @JsonProperty(value = "properties.enabled") + private Boolean enabled; + + /** + * Get the tags value. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags value. + * + * @param tags the tags value to set + * @return the ActionGroupPatchBody object itself. + */ + public ActionGroupPatchBody withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the enabled value. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled value. + * + * @param enabled the enabled value to set + * @return the ActionGroupPatchBody object itself. + */ + public ActionGroupPatchBody withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + +} diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/ActivityLogAlertPatchBody.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/ActivityLogAlertPatchBody.java new file mode 100644 index 00000000000..02b866de8aa --- /dev/null +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/ActivityLogAlertPatchBody.java @@ -0,0 +1,73 @@ +/** + * 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.monitor; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * An activity log alert object for the body of patch operations. + */ +@JsonFlatten +public class ActivityLogAlertPatchBody { + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Indicates whether this activity log alert is enabled. If an activity log + * alert is not enabled, then none of its actions will be activated. + */ + @JsonProperty(value = "properties.enabled") + private Boolean enabled; + + /** + * Get the tags value. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags value. + * + * @param tags the tags value to set + * @return the ActivityLogAlertPatchBody object itself. + */ + public ActivityLogAlertPatchBody withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the enabled value. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled value. + * + * @param enabled the enabled value to set + * @return the ActivityLogAlertPatchBody object itself. + */ + public ActivityLogAlertPatchBody withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + +} diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AlertRuleResourcePatch.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AlertRuleResourcePatch.java new file mode 100644 index 00000000000..e4d1065951d --- /dev/null +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AlertRuleResourcePatch.java @@ -0,0 +1,195 @@ +/** + * 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.monitor; + +import java.util.Map; +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The alert rule object for patch operations. + */ +@JsonFlatten +public class AlertRuleResourcePatch { + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * the name of the alert rule. + */ + @JsonProperty(value = "properties.name", required = true) + private String name; + + /** + * the description of the alert rule that will be included in the alert + * email. + */ + @JsonProperty(value = "properties.description") + private String description; + + /** + * the flag that indicates whether the alert rule is enabled. + */ + @JsonProperty(value = "properties.isEnabled", required = true) + private boolean isEnabled; + + /** + * the condition that results in the alert rule being activated. + */ + @JsonProperty(value = "properties.condition", required = true) + private RuleCondition condition; + + /** + * the array of actions that are performed when the alert rule becomes + * active, and when an alert condition is resolved. + */ + @JsonProperty(value = "properties.actions") + private List actions; + + /** + * Last time the rule was updated in ISO8601 format. + */ + @JsonProperty(value = "properties.lastUpdatedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastUpdatedTime; + + /** + * Get the tags value. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags value. + * + * @param tags the tags value to set + * @return the AlertRuleResourcePatch object itself. + */ + public AlertRuleResourcePatch withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the AlertRuleResourcePatch object itself. + */ + public AlertRuleResourcePatch withName(String name) { + this.name = name; + return this; + } + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description value. + * + * @param description the description value to set + * @return the AlertRuleResourcePatch object itself. + */ + public AlertRuleResourcePatch withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the isEnabled value. + * + * @return the isEnabled value + */ + public boolean isEnabled() { + return this.isEnabled; + } + + /** + * Set the isEnabled value. + * + * @param isEnabled the isEnabled value to set + * @return the AlertRuleResourcePatch object itself. + */ + public AlertRuleResourcePatch withIsEnabled(boolean isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + /** + * Get the condition value. + * + * @return the condition value + */ + public RuleCondition condition() { + return this.condition; + } + + /** + * Set the condition value. + * + * @param condition the condition value to set + * @return the AlertRuleResourcePatch object itself. + */ + public AlertRuleResourcePatch withCondition(RuleCondition condition) { + this.condition = condition; + return this; + } + + /** + * Get the actions value. + * + * @return the actions value + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions value. + * + * @param actions the actions value to set + * @return the AlertRuleResourcePatch object itself. + */ + public AlertRuleResourcePatch withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * Get the lastUpdatedTime value. + * + * @return the lastUpdatedTime value + */ + public DateTime lastUpdatedTime() { + return this.lastUpdatedTime; + } + +} diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AlertingAction.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AlertingAction.java index c3c709e77df..f18f5d019b1 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AlertingAction.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AlertingAction.java @@ -25,13 +25,13 @@ public class AlertingAction extends Action { private AlertSeverity severity; /** - * Azure action group reference. + * azns notification group reference. */ @JsonProperty(value = "aznsAction", required = true) private AzNsActionGroup aznsAction; /** - * time (in minutes) for which Alerts should be throttled or suppressed. + * time (in minutes) for which Alerts should be throttled. */ @JsonProperty(value = "throttlingInMin") private Integer throttlingInMin; diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AutoscaleSettingResourcePatch.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AutoscaleSettingResourcePatch.java new file mode 100644 index 00000000000..af655d8e6ef --- /dev/null +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AutoscaleSettingResourcePatch.java @@ -0,0 +1,181 @@ +/** + * 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.monitor; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The autoscale setting object for patch operations. + */ +@JsonFlatten +public class AutoscaleSettingResourcePatch { + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * the collection of automatic scaling profiles that specify different + * scaling parameters for different time periods. A maximum of 20 profiles + * can be specified. + */ + @JsonProperty(value = "properties.profiles", required = true) + private List profiles; + + /** + * the collection of notifications. + */ + @JsonProperty(value = "properties.notifications") + private List notifications; + + /** + * the enabled flag. Specifies whether automatic scaling is enabled for the + * resource. The default value is 'true'. + */ + @JsonProperty(value = "properties.enabled") + private Boolean enabled; + + /** + * the name of the autoscale setting. + */ + @JsonProperty(value = "properties.name") + private String name; + + /** + * the resource identifier of the resource that the autoscale setting + * should be added to. + */ + @JsonProperty(value = "properties.targetResourceUri") + private String targetResourceUri; + + /** + * Get the tags value. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags value. + * + * @param tags the tags value to set + * @return the AutoscaleSettingResourcePatch object itself. + */ + public AutoscaleSettingResourcePatch withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the profiles value. + * + * @return the profiles value + */ + public List profiles() { + return this.profiles; + } + + /** + * Set the profiles value. + * + * @param profiles the profiles value to set + * @return the AutoscaleSettingResourcePatch object itself. + */ + public AutoscaleSettingResourcePatch withProfiles(List profiles) { + this.profiles = profiles; + return this; + } + + /** + * Get the notifications value. + * + * @return the notifications value + */ + public List notifications() { + return this.notifications; + } + + /** + * Set the notifications value. + * + * @param notifications the notifications value to set + * @return the AutoscaleSettingResourcePatch object itself. + */ + public AutoscaleSettingResourcePatch withNotifications(List notifications) { + this.notifications = notifications; + return this; + } + + /** + * Get the enabled value. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled value. + * + * @param enabled the enabled value to set + * @return the AutoscaleSettingResourcePatch object itself. + */ + public AutoscaleSettingResourcePatch withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the AutoscaleSettingResourcePatch object itself. + */ + public AutoscaleSettingResourcePatch withName(String name) { + this.name = name; + return this; + } + + /** + * Get the targetResourceUri value. + * + * @return the targetResourceUri value + */ + public String targetResourceUri() { + return this.targetResourceUri; + } + + /** + * Set the targetResourceUri value. + * + * @param targetResourceUri the targetResourceUri value to set + * @return the AutoscaleSettingResourcePatch object itself. + */ + public AutoscaleSettingResourcePatch withTargetResourceUri(String targetResourceUri) { + this.targetResourceUri = targetResourceUri; + return this; + } + +} diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AzNsActionGroup.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AzNsActionGroup.java index 78d21eb6059..b33a01f9236 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AzNsActionGroup.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AzNsActionGroup.java @@ -12,23 +12,23 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Azure action group. + * azns notification group. */ public class AzNsActionGroup { /** - * Azure Action Group reference. + * Azure Group reference. */ @JsonProperty(value = "actionGroup") private List actionGroup; /** - * Custom subject override for all email ids in Azure action group. + * Custom subject for Azns email. */ @JsonProperty(value = "emailSubject") private String emailSubject; /** - * Custom payload to be sent for all webook URI in Azure action group. + * Custom webhook payload to be send to azns action group. */ @JsonProperty(value = "customWebhookPayload") private String customWebhookPayload; diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/LogProfileResourcePatch.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/LogProfileResourcePatch.java new file mode 100644 index 00000000000..12dec8935e0 --- /dev/null +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/LogProfileResourcePatch.java @@ -0,0 +1,185 @@ +/** + * 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.monitor; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The log profile resource for patch operations. + */ +@JsonFlatten +public class LogProfileResourcePatch { + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * the resource id of the storage account to which you would like to send + * the Activity Log. + */ + @JsonProperty(value = "properties.storageAccountId") + private String storageAccountId; + + /** + * The service bus rule ID of the service bus namespace in which you would + * like to have Event Hubs created for streaming the Activity Log. The rule + * ID is of the format: '{service bus resource ID}/authorizationrules/{key + * name}'. + */ + @JsonProperty(value = "properties.serviceBusRuleId") + private String serviceBusRuleId; + + /** + * List of regions for which Activity Log events should be stored or + * streamed. It is a comma separated list of valid ARM locations including + * the 'global' location. + */ + @JsonProperty(value = "properties.locations", required = true) + private List locations; + + /** + * the categories of the logs. These categories are created as is + * convenient to the user. Some values are: 'Write', 'Delete', and/or + * 'Action.'. + */ + @JsonProperty(value = "properties.categories", required = true) + private List categories; + + /** + * the retention policy for the events in the log. + */ + @JsonProperty(value = "properties.retentionPolicy", required = true) + private RetentionPolicy retentionPolicy; + + /** + * Get the tags value. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags value. + * + * @param tags the tags value to set + * @return the LogProfileResourcePatch object itself. + */ + public LogProfileResourcePatch withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the storageAccountId value. + * + * @return the storageAccountId value + */ + public String storageAccountId() { + return this.storageAccountId; + } + + /** + * Set the storageAccountId value. + * + * @param storageAccountId the storageAccountId value to set + * @return the LogProfileResourcePatch object itself. + */ + public LogProfileResourcePatch withStorageAccountId(String storageAccountId) { + this.storageAccountId = storageAccountId; + return this; + } + + /** + * Get the serviceBusRuleId value. + * + * @return the serviceBusRuleId value + */ + public String serviceBusRuleId() { + return this.serviceBusRuleId; + } + + /** + * Set the serviceBusRuleId value. + * + * @param serviceBusRuleId the serviceBusRuleId value to set + * @return the LogProfileResourcePatch object itself. + */ + public LogProfileResourcePatch withServiceBusRuleId(String serviceBusRuleId) { + this.serviceBusRuleId = serviceBusRuleId; + return this; + } + + /** + * Get the locations value. + * + * @return the locations value + */ + public List locations() { + return this.locations; + } + + /** + * Set the locations value. + * + * @param locations the locations value to set + * @return the LogProfileResourcePatch object itself. + */ + public LogProfileResourcePatch withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Get the categories value. + * + * @return the categories value + */ + public List categories() { + return this.categories; + } + + /** + * Set the categories value. + * + * @param categories the categories value to set + * @return the LogProfileResourcePatch object itself. + */ + public LogProfileResourcePatch withCategories(List categories) { + this.categories = categories; + return this; + } + + /** + * Get the retentionPolicy value. + * + * @return the retentionPolicy value + */ + public RetentionPolicy retentionPolicy() { + return this.retentionPolicy; + } + + /** + * Set the retentionPolicy value. + * + * @param retentionPolicy the retentionPolicy value to set + * @return the LogProfileResourcePatch object itself. + */ + public LogProfileResourcePatch withRetentionPolicy(RetentionPolicy retentionPolicy) { + this.retentionPolicy = retentionPolicy; + return this; + } + +} diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/MetricAlertResourcePatch.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/MetricAlertResourcePatch.java new file mode 100644 index 00000000000..f3742e24d1e --- /dev/null +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/MetricAlertResourcePatch.java @@ -0,0 +1,303 @@ +/** + * 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.monitor; + +import java.util.Map; +import java.util.List; +import org.joda.time.Period; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The metric alert resource for patch operations. + */ +@JsonFlatten +public class MetricAlertResourcePatch { + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * the description of the metric alert that will be included in the alert + * email. + */ + @JsonProperty(value = "properties.description", required = true) + private String description; + + /** + * Alert severity {0, 1, 2, 3, 4}. + */ + @JsonProperty(value = "properties.severity", required = true) + private int severity; + + /** + * the flag that indicates whether the metric alert is enabled. + */ + @JsonProperty(value = "properties.enabled", required = true) + private boolean enabled; + + /** + * the list of resource id's that this metric alert is scoped to. + */ + @JsonProperty(value = "properties.scopes") + private List scopes; + + /** + * how often the metric alert is evaluated represented in ISO 8601 duration + * format. + */ + @JsonProperty(value = "properties.evaluationFrequency", required = true) + private Period evaluationFrequency; + + /** + * the period of time (in ISO 8601 duration format) that is used to monitor + * alert activity based on the threshold. + */ + @JsonProperty(value = "properties.windowSize", required = true) + private Period windowSize; + + /** + * defines the specific alert criteria information. + */ + @JsonProperty(value = "properties.criteria", required = true) + private MetricAlertCriteria criteria; + + /** + * the flag that indicates whether the alert should be auto resolved or + * not. + */ + @JsonProperty(value = "properties.autoMitigate") + private Boolean autoMitigate; + + /** + * the array of actions that are performed when the alert rule becomes + * active, and when an alert condition is resolved. + */ + @JsonProperty(value = "properties.actions") + private List actions; + + /** + * Last time the rule was updated in ISO8601 format. + */ + @JsonProperty(value = "properties.lastUpdatedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastUpdatedTime; + + /** + * Get the tags value. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags value. + * + * @param tags the tags value to set + * @return the MetricAlertResourcePatch object itself. + */ + public MetricAlertResourcePatch withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description value. + * + * @param description the description value to set + * @return the MetricAlertResourcePatch object itself. + */ + public MetricAlertResourcePatch withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the severity value. + * + * @return the severity value + */ + public int severity() { + return this.severity; + } + + /** + * Set the severity value. + * + * @param severity the severity value to set + * @return the MetricAlertResourcePatch object itself. + */ + public MetricAlertResourcePatch withSeverity(int severity) { + this.severity = severity; + return this; + } + + /** + * Get the enabled value. + * + * @return the enabled value + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled value. + * + * @param enabled the enabled value to set + * @return the MetricAlertResourcePatch object itself. + */ + public MetricAlertResourcePatch withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the scopes value. + * + * @return the scopes value + */ + public List scopes() { + return this.scopes; + } + + /** + * Set the scopes value. + * + * @param scopes the scopes value to set + * @return the MetricAlertResourcePatch object itself. + */ + public MetricAlertResourcePatch withScopes(List scopes) { + this.scopes = scopes; + return this; + } + + /** + * Get the evaluationFrequency value. + * + * @return the evaluationFrequency value + */ + public Period evaluationFrequency() { + return this.evaluationFrequency; + } + + /** + * Set the evaluationFrequency value. + * + * @param evaluationFrequency the evaluationFrequency value to set + * @return the MetricAlertResourcePatch object itself. + */ + public MetricAlertResourcePatch withEvaluationFrequency(Period evaluationFrequency) { + this.evaluationFrequency = evaluationFrequency; + return this; + } + + /** + * Get the windowSize value. + * + * @return the windowSize value + */ + public Period windowSize() { + return this.windowSize; + } + + /** + * Set the windowSize value. + * + * @param windowSize the windowSize value to set + * @return the MetricAlertResourcePatch object itself. + */ + public MetricAlertResourcePatch withWindowSize(Period windowSize) { + this.windowSize = windowSize; + return this; + } + + /** + * Get the criteria value. + * + * @return the criteria value + */ + public MetricAlertCriteria criteria() { + return this.criteria; + } + + /** + * Set the criteria value. + * + * @param criteria the criteria value to set + * @return the MetricAlertResourcePatch object itself. + */ + public MetricAlertResourcePatch withCriteria(MetricAlertCriteria criteria) { + this.criteria = criteria; + return this; + } + + /** + * Get the autoMitigate value. + * + * @return the autoMitigate value + */ + public Boolean autoMitigate() { + return this.autoMitigate; + } + + /** + * Set the autoMitigate value. + * + * @param autoMitigate the autoMitigate value to set + * @return the MetricAlertResourcePatch object itself. + */ + public MetricAlertResourcePatch withAutoMitigate(Boolean autoMitigate) { + this.autoMitigate = autoMitigate; + return this; + } + + /** + * Get the actions value. + * + * @return the actions value + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions value. + * + * @param actions the actions value to set + * @return the MetricAlertResourcePatch object itself. + */ + public MetricAlertResourcePatch withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * Get the lastUpdatedTime value. + * + * @return the lastUpdatedTime value + */ + public DateTime lastUpdatedTime() { + return this.lastUpdatedTime; + } + +} diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/Source.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/Source.java index 692ae34d192..9975f717548 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/Source.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/Source.java @@ -30,8 +30,8 @@ public class Source { /** * The resource uri over which log search query is to be run. */ - @JsonProperty(value = "dataSourceId", required = true) - private String dataSourceId; + @JsonProperty(value = "datasourceId", required = true) + private String datasourceId; /** * Set value to ResultCount if query should be returning search result @@ -82,22 +82,22 @@ public Source withAuthorizedResources(List authorizedResources) { } /** - * Get the dataSourceId value. + * Get the datasourceId value. * - * @return the dataSourceId value + * @return the datasourceId value */ - public String dataSourceId() { - return this.dataSourceId; + public String datasourceId() { + return this.datasourceId; } /** - * Set the dataSourceId value. + * Set the datasourceId value. * - * @param dataSourceId the dataSourceId value to set + * @param datasourceId the datasourceId value to set * @return the Source object itself. */ - public Source withDataSourceId(String dataSourceId) { - this.dataSourceId = dataSourceId; + public Source withDatasourceId(String datasourceId) { + this.datasourceId = datasourceId; return this; } diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/TimeSeriesInformation.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/TimeSeriesInformation.java new file mode 100644 index 00000000000..7cdba9e7c7f --- /dev/null +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/TimeSeriesInformation.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.monitor; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The time series info needed for calculating the baseline. + */ +public class TimeSeriesInformation { + /** + * the list of sensitivities for calculating the baseline. + */ + @JsonProperty(value = "sensitivities", required = true) + private List sensitivities; + + /** + * The metric values to calculate the baseline. + */ + @JsonProperty(value = "values", required = true) + private List values; + + /** + * the array of timestamps of the baselines. + */ + @JsonProperty(value = "timestamps") + private List timestamps; + + /** + * Get the sensitivities value. + * + * @return the sensitivities value + */ + public List sensitivities() { + return this.sensitivities; + } + + /** + * Set the sensitivities value. + * + * @param sensitivities the sensitivities value to set + * @return the TimeSeriesInformation object itself. + */ + public TimeSeriesInformation withSensitivities(List sensitivities) { + this.sensitivities = sensitivities; + return this; + } + + /** + * Get the values value. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Set the values value. + * + * @param values the values value to set + * @return the TimeSeriesInformation object itself. + */ + public TimeSeriesInformation withValues(List values) { + this.values = values; + return this; + } + + /** + * Get the timestamps value. + * + * @return the timestamps value + */ + public List timestamps() { + return this.timestamps; + } + + /** + * Set the timestamps value. + * + * @param timestamps the timestamps value to set + * @return the TimeSeriesInformation object itself. + */ + public TimeSeriesInformation withTimestamps(List timestamps) { + this.timestamps = timestamps; + return this; + } + +} diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ActionGroupsInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ActionGroupsInner.java index 3c00da21137..dc27541438d 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ActionGroupsInner.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ActionGroupsInner.java @@ -13,6 +13,7 @@ import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.monitor.ActionGroupPatchBody; import com.microsoft.azure.management.monitor.EnableRequest; import com.microsoft.azure.management.monitor.ErrorResponseException; import com.microsoft.azure.Page; @@ -78,7 +79,7 @@ interface ActionGroupsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.monitor.ActionGroups update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("actionGroupName") String actionGroupName, @Query("api-version") String apiVersion, @Body ActionGroupPatchBodyInner actionGroupPatch, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("actionGroupName") String actionGroupName, @Query("api-version") String apiVersion, @Body ActionGroupPatchBody actionGroupPatch, @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.monitor.ActionGroups list" }) @GET("subscriptions/{subscriptionId}/providers/microsoft.insights/actionGroups") @@ -366,7 +367,7 @@ private ServiceResponse deleteDelegate(Response response) th * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ActionGroupResourceInner object if successful. */ - public ActionGroupResourceInner update(String resourceGroupName, String actionGroupName, ActionGroupPatchBodyInner actionGroupPatch) { + public ActionGroupResourceInner update(String resourceGroupName, String actionGroupName, ActionGroupPatchBody actionGroupPatch) { return updateWithServiceResponseAsync(resourceGroupName, actionGroupName, actionGroupPatch).toBlocking().single().body(); } @@ -380,7 +381,7 @@ public ActionGroupResourceInner update(String resourceGroupName, String actionGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String resourceGroupName, String actionGroupName, ActionGroupPatchBodyInner actionGroupPatch, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String actionGroupName, ActionGroupPatchBody actionGroupPatch, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, actionGroupName, actionGroupPatch), serviceCallback); } @@ -393,7 +394,7 @@ public ServiceFuture updateAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ActionGroupResourceInner object */ - public Observable updateAsync(String resourceGroupName, String actionGroupName, ActionGroupPatchBodyInner actionGroupPatch) { + public Observable updateAsync(String resourceGroupName, String actionGroupName, ActionGroupPatchBody actionGroupPatch) { return updateWithServiceResponseAsync(resourceGroupName, actionGroupName, actionGroupPatch).map(new Func1, ActionGroupResourceInner>() { @Override public ActionGroupResourceInner call(ServiceResponse response) { @@ -411,7 +412,7 @@ public ActionGroupResourceInner call(ServiceResponse r * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ActionGroupResourceInner object */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String actionGroupName, ActionGroupPatchBodyInner actionGroupPatch) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String actionGroupName, ActionGroupPatchBody actionGroupPatch) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -506,7 +507,11 @@ public Observable>> listWithServi public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.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); @@ -588,7 +593,11 @@ public Observable>> listByResourc public Observable>> call(Response response) { try { ServiceResponse> result = listByResourceGroupDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.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); diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ActivityLogAlertsInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ActivityLogAlertsInner.java index c51bcee888a..ecfba36c6c8 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ActivityLogAlertsInner.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ActivityLogAlertsInner.java @@ -13,6 +13,7 @@ import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.monitor.ActivityLogAlertPatchBody; import com.microsoft.azure.management.monitor.ErrorResponseException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; @@ -76,7 +77,7 @@ interface ActivityLogAlertsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.monitor.ActivityLogAlerts update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("activityLogAlertName") String activityLogAlertName, @Query("api-version") String apiVersion, @Body ActivityLogAlertPatchBodyInner activityLogAlertPatch, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("activityLogAlertName") String activityLogAlertName, @Query("api-version") String apiVersion, @Body ActivityLogAlertPatchBody activityLogAlertPatch, @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.monitor.ActivityLogAlerts list" }) @GET("subscriptions/{subscriptionId}/providers/microsoft.insights/activityLogAlerts") @@ -360,7 +361,7 @@ private ServiceResponse deleteDelegate(Response response) th * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ActivityLogAlertResourceInner object if successful. */ - public ActivityLogAlertResourceInner update(String resourceGroupName, String activityLogAlertName, ActivityLogAlertPatchBodyInner activityLogAlertPatch) { + public ActivityLogAlertResourceInner update(String resourceGroupName, String activityLogAlertName, ActivityLogAlertPatchBody activityLogAlertPatch) { return updateWithServiceResponseAsync(resourceGroupName, activityLogAlertName, activityLogAlertPatch).toBlocking().single().body(); } @@ -374,7 +375,7 @@ public ActivityLogAlertResourceInner update(String resourceGroupName, String act * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String resourceGroupName, String activityLogAlertName, ActivityLogAlertPatchBodyInner activityLogAlertPatch, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String activityLogAlertName, ActivityLogAlertPatchBody activityLogAlertPatch, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, activityLogAlertName, activityLogAlertPatch), serviceCallback); } @@ -387,7 +388,7 @@ public ServiceFuture updateAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ActivityLogAlertResourceInner object */ - public Observable updateAsync(String resourceGroupName, String activityLogAlertName, ActivityLogAlertPatchBodyInner activityLogAlertPatch) { + public Observable updateAsync(String resourceGroupName, String activityLogAlertName, ActivityLogAlertPatchBody activityLogAlertPatch) { return updateWithServiceResponseAsync(resourceGroupName, activityLogAlertName, activityLogAlertPatch).map(new Func1, ActivityLogAlertResourceInner>() { @Override public ActivityLogAlertResourceInner call(ServiceResponse response) { @@ -405,7 +406,7 @@ public ActivityLogAlertResourceInner call(ServiceResponse> updateWithServiceResponseAsync(String resourceGroupName, String activityLogAlertName, ActivityLogAlertPatchBodyInner activityLogAlertPatch) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String activityLogAlertName, ActivityLogAlertPatchBody activityLogAlertPatch) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -500,7 +501,11 @@ public Observable>> listWith public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.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); @@ -582,7 +587,11 @@ public Observable>> listByRe public Observable>> call(Response response) { try { ServiceResponse> result = listByResourceGroupDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.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); diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/AlertRuleIncidentsInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/AlertRuleIncidentsInner.java index 829effd303e..0582f08c7fe 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/AlertRuleIncidentsInner.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/AlertRuleIncidentsInner.java @@ -223,7 +223,11 @@ public Observable>> listByAlertRuleWithServi public Observable>> call(Response response) { try { ServiceResponse> result = listByAlertRuleDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.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); diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/AlertRulesInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/AlertRulesInner.java index 7722eb20a4c..4858b842db1 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/AlertRulesInner.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/AlertRulesInner.java @@ -13,6 +13,7 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.monitor.AlertRuleResourcePatch; import com.microsoft.azure.management.monitor.ErrorResponseException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; @@ -76,7 +77,7 @@ interface AlertRulesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.monitor.AlertRules update" }) @PATCH("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("ruleName") String ruleName, @Query("api-version") String apiVersion, @Body AlertRuleResourcePatchInner alertRulesResource, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("ruleName") String ruleName, @Query("api-version") String apiVersion, @Body AlertRuleResourcePatch alertRulesResource, @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.monitor.AlertRules listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules") @@ -356,7 +357,7 @@ private ServiceResponse getByResourceGroupDelegate(Respo * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the AlertRuleResourceInner object if successful. */ - public AlertRuleResourceInner update(String resourceGroupName, String ruleName, AlertRuleResourcePatchInner alertRulesResource) { + public AlertRuleResourceInner update(String resourceGroupName, String ruleName, AlertRuleResourcePatch alertRulesResource) { return updateWithServiceResponseAsync(resourceGroupName, ruleName, alertRulesResource).toBlocking().single().body(); } @@ -370,7 +371,7 @@ public AlertRuleResourceInner update(String resourceGroupName, String ruleName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String resourceGroupName, String ruleName, AlertRuleResourcePatchInner alertRulesResource, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String ruleName, AlertRuleResourcePatch alertRulesResource, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, ruleName, alertRulesResource), serviceCallback); } @@ -383,7 +384,7 @@ public ServiceFuture updateAsync(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AlertRuleResourceInner object */ - public Observable updateAsync(String resourceGroupName, String ruleName, AlertRuleResourcePatchInner alertRulesResource) { + public Observable updateAsync(String resourceGroupName, String ruleName, AlertRuleResourcePatch alertRulesResource) { return updateWithServiceResponseAsync(resourceGroupName, ruleName, alertRulesResource).map(new Func1, AlertRuleResourceInner>() { @Override public AlertRuleResourceInner call(ServiceResponse response) { @@ -401,7 +402,7 @@ public AlertRuleResourceInner call(ServiceResponse respo * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AlertRuleResourceInner object */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String ruleName, AlertRuleResourcePatchInner alertRulesResource) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String ruleName, AlertRuleResourcePatch alertRulesResource) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -504,7 +505,11 @@ public Observable>> listByResourceG public Observable>> call(Response response) { try { ServiceResponse> result = listByResourceGroupDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.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); diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/AutoscaleSettingsInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/AutoscaleSettingsInner.java index 27c2b457bfd..d3900756875 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/AutoscaleSettingsInner.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/AutoscaleSettingsInner.java @@ -14,6 +14,7 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.monitor.AutoscaleSettingResourcePatch; import com.microsoft.azure.management.monitor.ErrorResponseException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; @@ -82,7 +83,7 @@ interface AutoscaleSettingsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.monitor.AutoscaleSettings update" }) @PATCH("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("autoscaleSettingName") String autoscaleSettingName, @Query("api-version") String apiVersion, @Body AutoscaleSettingResourcePatchInner autoscaleSettingResource, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("autoscaleSettingName") String autoscaleSettingName, @Query("api-version") String apiVersion, @Body AutoscaleSettingResourcePatch autoscaleSettingResource, @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.monitor.AutoscaleSettings listByResourceGroupNext" }) @GET @@ -475,7 +476,7 @@ private ServiceResponse getByResourceGroupDelegat * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the AutoscaleSettingResourceInner object if successful. */ - public AutoscaleSettingResourceInner update(String resourceGroupName, String autoscaleSettingName, AutoscaleSettingResourcePatchInner autoscaleSettingResource) { + public AutoscaleSettingResourceInner update(String resourceGroupName, String autoscaleSettingName, AutoscaleSettingResourcePatch autoscaleSettingResource) { return updateWithServiceResponseAsync(resourceGroupName, autoscaleSettingName, autoscaleSettingResource).toBlocking().single().body(); } @@ -489,7 +490,7 @@ public AutoscaleSettingResourceInner update(String resourceGroupName, String aut * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String resourceGroupName, String autoscaleSettingName, AutoscaleSettingResourcePatchInner autoscaleSettingResource, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String autoscaleSettingName, AutoscaleSettingResourcePatch autoscaleSettingResource, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, autoscaleSettingName, autoscaleSettingResource), serviceCallback); } @@ -502,7 +503,7 @@ public ServiceFuture updateAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AutoscaleSettingResourceInner object */ - public Observable updateAsync(String resourceGroupName, String autoscaleSettingName, AutoscaleSettingResourcePatchInner autoscaleSettingResource) { + public Observable updateAsync(String resourceGroupName, String autoscaleSettingName, AutoscaleSettingResourcePatch autoscaleSettingResource) { return updateWithServiceResponseAsync(resourceGroupName, autoscaleSettingName, autoscaleSettingResource).map(new Func1, AutoscaleSettingResourceInner>() { @Override public AutoscaleSettingResourceInner call(ServiceResponse response) { @@ -520,7 +521,7 @@ public AutoscaleSettingResourceInner call(ServiceResponse> updateWithServiceResponseAsync(String resourceGroupName, String autoscaleSettingName, AutoscaleSettingResourcePatchInner autoscaleSettingResource) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String autoscaleSettingName, AutoscaleSettingResourcePatch autoscaleSettingResource) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/EventCategoriesInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/EventCategoriesInner.java index ef7d2b16063..baa063f2738 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/EventCategoriesInner.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/EventCategoriesInner.java @@ -109,7 +109,11 @@ public Observable>> listWithService public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.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); diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/LogProfilesInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/LogProfilesInner.java index 06212db0fe3..5084cbf238a 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/LogProfilesInner.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/LogProfilesInner.java @@ -12,6 +12,7 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; import com.microsoft.azure.management.monitor.ErrorResponseException; +import com.microsoft.azure.management.monitor.LogProfileResourcePatch; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -74,7 +75,7 @@ interface LogProfilesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.monitor.LogProfiles update" }) @PATCH("subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("logProfileName") String logProfileName, @Query("api-version") String apiVersion, @Body LogProfileResourcePatchInner logProfilesResource, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("logProfileName") String logProfileName, @Query("api-version") String apiVersion, @Body LogProfileResourcePatch logProfilesResource, @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.monitor.LogProfiles list" }) @GET("subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles") @@ -330,7 +331,7 @@ private ServiceResponse createOrUpdateDelegate(Response * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the LogProfileResourceInner object if successful. */ - public LogProfileResourceInner update(String logProfileName, LogProfileResourcePatchInner logProfilesResource) { + public LogProfileResourceInner update(String logProfileName, LogProfileResourcePatch logProfilesResource) { return updateWithServiceResponseAsync(logProfileName, logProfilesResource).toBlocking().single().body(); } @@ -343,7 +344,7 @@ public LogProfileResourceInner update(String logProfileName, LogProfileResourceP * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String logProfileName, LogProfileResourcePatchInner logProfilesResource, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String logProfileName, LogProfileResourcePatch logProfilesResource, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(logProfileName, logProfilesResource), serviceCallback); } @@ -355,7 +356,7 @@ public ServiceFuture updateAsync(String logProfileName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the LogProfileResourceInner object */ - public Observable updateAsync(String logProfileName, LogProfileResourcePatchInner logProfilesResource) { + public Observable updateAsync(String logProfileName, LogProfileResourcePatch logProfilesResource) { return updateWithServiceResponseAsync(logProfileName, logProfilesResource).map(new Func1, LogProfileResourceInner>() { @Override public LogProfileResourceInner call(ServiceResponse response) { @@ -372,7 +373,7 @@ public LogProfileResourceInner call(ServiceResponse res * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the LogProfileResourceInner object */ - public Observable> updateWithServiceResponseAsync(String logProfileName, LogProfileResourcePatchInner logProfilesResource) { + public Observable> updateWithServiceResponseAsync(String logProfileName, LogProfileResourcePatch logProfilesResource) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -464,7 +465,11 @@ public Observable>> listWithServic public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.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); diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricAlertResourceInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricAlertResourceInner.java index d646967537b..37939e0910e 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricAlertResourceInner.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricAlertResourceInner.java @@ -67,6 +67,13 @@ public class MetricAlertResourceInner extends Resource { @JsonProperty(value = "properties.criteria", required = true) private MetricAlertCriteria criteria; + /** + * the flag that indicates whether the alert should be auto resolved or + * not. + */ + @JsonProperty(value = "properties.autoMitigate") + private Boolean autoMitigate; + /** * the array of actions that are performed when the alert rule becomes * active, and when an alert condition is resolved. @@ -220,6 +227,26 @@ public MetricAlertResourceInner withCriteria(MetricAlertCriteria criteria) { return this; } + /** + * Get the autoMitigate value. + * + * @return the autoMitigate value + */ + public Boolean autoMitigate() { + return this.autoMitigate; + } + + /** + * Set the autoMitigate value. + * + * @param autoMitigate the autoMitigate value to set + * @return the MetricAlertResourceInner object itself. + */ + public MetricAlertResourceInner withAutoMitigate(Boolean autoMitigate) { + this.autoMitigate = autoMitigate; + return this; + } + /** * Get the actions value. * diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricAlertsInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricAlertsInner.java index 2dc5dd484f8..5cc7ac2e805 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricAlertsInner.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricAlertsInner.java @@ -15,6 +15,7 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; import com.microsoft.azure.management.monitor.ErrorResponseException; +import com.microsoft.azure.management.monitor.MetricAlertResourcePatch; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -81,7 +82,7 @@ interface MetricAlertsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.monitor.MetricAlerts update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("ruleName") String ruleName, @Query("api-version") String apiVersion, @Body MetricAlertResourcePatchInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("ruleName") String ruleName, @Query("api-version") String apiVersion, @Body MetricAlertResourcePatch parameters, @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.monitor.MetricAlerts delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}", method = "DELETE", hasBody = true) @@ -148,7 +149,11 @@ public Observable>> listWithServi public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.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); @@ -230,7 +235,11 @@ public Observable>> listByResourc public Observable>> call(Response response) { try { ServiceResponse> result = listByResourceGroupDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.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); @@ -433,7 +442,7 @@ private ServiceResponse createOrUpdateDelegate(Respons * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the MetricAlertResourceInner object if successful. */ - public MetricAlertResourceInner update(String resourceGroupName, String ruleName, MetricAlertResourcePatchInner parameters) { + public MetricAlertResourceInner update(String resourceGroupName, String ruleName, MetricAlertResourcePatch parameters) { return updateWithServiceResponseAsync(resourceGroupName, ruleName, parameters).toBlocking().single().body(); } @@ -447,7 +456,7 @@ public MetricAlertResourceInner update(String resourceGroupName, String ruleName * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String resourceGroupName, String ruleName, MetricAlertResourcePatchInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String ruleName, MetricAlertResourcePatch parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, ruleName, parameters), serviceCallback); } @@ -460,7 +469,7 @@ public ServiceFuture updateAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the MetricAlertResourceInner object */ - public Observable updateAsync(String resourceGroupName, String ruleName, MetricAlertResourcePatchInner parameters) { + public Observable updateAsync(String resourceGroupName, String ruleName, MetricAlertResourcePatch parameters) { return updateWithServiceResponseAsync(resourceGroupName, ruleName, parameters).map(new Func1, MetricAlertResourceInner>() { @Override public MetricAlertResourceInner call(ServiceResponse response) { @@ -478,7 +487,7 @@ public MetricAlertResourceInner call(ServiceResponse r * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the MetricAlertResourceInner object */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String ruleName, MetricAlertResourcePatchInner parameters) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String ruleName, MetricAlertResourcePatch parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricBaselinesInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricBaselinesInner.java index 17e55ebbe83..b2855c0b9fd 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricBaselinesInner.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricBaselinesInner.java @@ -12,6 +12,7 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.management.monitor.ErrorResponseException; import com.microsoft.azure.management.monitor.ResultType; +import com.microsoft.azure.management.monitor.TimeSeriesInformation; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; @@ -62,7 +63,7 @@ interface MetricBaselinesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.monitor.MetricBaselines calculateBaseline" }) @POST("{resourceUri}/providers/microsoft.insights/calculatebaseline") - Observable> calculateBaseline(@Path(value = "resourceUri", encoded = true) String resourceUri, @Query("api-version") String apiVersion, @Body TimeSeriesInformationInner timeSeriesInformation, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> calculateBaseline(@Path(value = "resourceUri", encoded = true) String resourceUri, @Query("api-version") String apiVersion, @Body TimeSeriesInformation timeSeriesInformation, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } @@ -256,7 +257,7 @@ private ServiceResponse getDelegate(Response calculateBaselineAsync(String resourceUri, TimeSeriesInformationInner timeSeriesInformation, final ServiceCallback serviceCallback) { + public ServiceFuture calculateBaselineAsync(String resourceUri, TimeSeriesInformation timeSeriesInformation, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(calculateBaselineWithServiceResponseAsync(resourceUri, timeSeriesInformation), serviceCallback); } @@ -281,7 +282,7 @@ public ServiceFuture calculateBaselineAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the CalculateBaselineResponseInner object */ - public Observable calculateBaselineAsync(String resourceUri, TimeSeriesInformationInner timeSeriesInformation) { + public Observable calculateBaselineAsync(String resourceUri, TimeSeriesInformation timeSeriesInformation) { return calculateBaselineWithServiceResponseAsync(resourceUri, timeSeriesInformation).map(new Func1, CalculateBaselineResponseInner>() { @Override public CalculateBaselineResponseInner call(ServiceResponse response) { @@ -298,7 +299,7 @@ public CalculateBaselineResponseInner call(ServiceResponse> calculateBaselineWithServiceResponseAsync(String resourceUri, TimeSeriesInformationInner timeSeriesInformation) { + public Observable> calculateBaselineWithServiceResponseAsync(String resourceUri, TimeSeriesInformation timeSeriesInformation) { if (resourceUri == null) { throw new IllegalArgumentException("Parameter resourceUri is required and cannot be null."); } diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricDefinitionsInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricDefinitionsInner.java index c3976d9c411..5d4cb841b25 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricDefinitionsInner.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricDefinitionsInner.java @@ -118,7 +118,11 @@ public Observable>> listWithServiceR public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.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); @@ -190,7 +194,11 @@ public Observable>> listWithServiceR public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.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); diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricInner.java new file mode 100644 index 00000000000..0856a1b2be3 --- /dev/null +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/MetricInner.java @@ -0,0 +1,153 @@ +/** + * 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.monitor.implementation; + +import com.microsoft.azure.management.monitor.Unit; +import java.util.List; +import com.microsoft.azure.management.monitor.TimeSeriesElement; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The result data of a query. + */ +public class MetricInner { + /** + * the metric Id. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * the resource type of the metric resource. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * the name and the display name of the metric, i.e. it is localizable + * string. + */ + @JsonProperty(value = "name", required = true) + private LocalizableStringInner name; + + /** + * the unit of the metric. Possible values include: 'Count', 'Bytes', + * 'Seconds', 'CountPerSecond', 'BytesPerSecond', 'Percent', + * 'MilliSeconds', 'ByteSeconds', 'Unspecified'. + */ + @JsonProperty(value = "unit", required = true) + private Unit unit; + + /** + * the time series returned when a data query is performed. + */ + @JsonProperty(value = "timeseries", required = true) + private List timeseries; + + /** + * Get the id value. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the id value. + * + * @param id the id value to set + * @return the MetricInner object itself. + */ + public MetricInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the type value. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the MetricInner object itself. + */ + public MetricInner withType(String type) { + this.type = type; + return this; + } + + /** + * Get the name value. + * + * @return the name value + */ + public LocalizableStringInner name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the MetricInner object itself. + */ + public MetricInner withName(LocalizableStringInner name) { + this.name = name; + return this; + } + + /** + * Get the unit value. + * + * @return the unit value + */ + public Unit unit() { + return this.unit; + } + + /** + * Set the unit value. + * + * @param unit the unit value to set + * @return the MetricInner object itself. + */ + public MetricInner withUnit(Unit unit) { + this.unit = unit; + return this; + } + + /** + * Get the timeseries value. + * + * @return the timeseries value + */ + public List timeseries() { + return this.timeseries; + } + + /** + * Set the timeseries value. + * + * @param timeseries the timeseries value to set + * @return the MetricInner object itself. + */ + public MetricInner withTimeseries(List timeseries) { + this.timeseries = timeseries; + return this; + } + +} diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/OperationInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/OperationInner.java new file mode 100644 index 00000000000..62b2f51a240 --- /dev/null +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/OperationInner.java @@ -0,0 +1,70 @@ +/** + * 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.monitor.implementation; + +import com.microsoft.azure.management.monitor.OperationDisplay; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Microsoft Insights API operation definition. + */ +public class OperationInner { + /** + * Operation name: {provider}/{resource}/{operation}. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Display metadata associated with the operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the OperationInner object itself. + */ + public OperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display value. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display value. + * + * @param display the display value to set + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + +} diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/OperationListResultInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/OperationListResultInner.java index 9181700a4f8..b3b1a72e87f 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/OperationListResultInner.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/OperationListResultInner.java @@ -9,7 +9,6 @@ package com.microsoft.azure.management.monitor.implementation; import java.util.List; -import com.microsoft.azure.management.monitor.Operation; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -21,7 +20,7 @@ public class OperationListResultInner { * List of operations supported by the Microsoft.Insights provider. */ @JsonProperty(value = "value") - private List value; + private List value; /** * URL to get the next set of operation list results if there are any. @@ -34,7 +33,7 @@ public class OperationListResultInner { * * @return the value value */ - public List value() { + public List value() { return this.value; } @@ -44,7 +43,7 @@ public List value() { * @param value the value value to set * @return the OperationListResultInner object itself. */ - public OperationListResultInner withValue(List value) { + public OperationListResultInner withValue(List value) { this.value = value; return this; } diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ResponseInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ResponseInner.java index 84b48ef811b..4ed92b46869 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ResponseInner.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ResponseInner.java @@ -10,7 +10,6 @@ import org.joda.time.Period; import java.util.List; -import com.microsoft.azure.management.monitor.Metric; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -56,7 +55,7 @@ public class ResponseInner { * the value of the collection. */ @JsonProperty(value = "value", required = true) - private List value; + private List value; /** * Get the cost value. @@ -163,7 +162,7 @@ public ResponseInner withResourceregion(String resourceregion) { * * @return the value value */ - public List value() { + public List value() { return this.value; } @@ -173,7 +172,7 @@ public List value() { * @param value the value value to set * @return the ResponseInner object itself. */ - public ResponseInner withValue(List value) { + public ResponseInner withValue(List value) { this.value = value; return this; } diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ScheduledQueryRulesInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ScheduledQueryRulesInner.java index d2da7e63829..385f57a3992 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ScheduledQueryRulesInner.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ScheduledQueryRulesInner.java @@ -404,7 +404,11 @@ public Observable>> listWithSer public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.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); @@ -476,7 +480,11 @@ public Observable>> listWithSer public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.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); @@ -559,7 +567,11 @@ public Observable>> listByResou public Observable>> call(Response response) { try { ServiceResponse> result = listByResourceGroupDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.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); @@ -638,7 +650,11 @@ public Observable>> listByResou public Observable>> call(Response response) { try { ServiceResponse> result = listByResourceGroupDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.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);