From b6af5b96ae8af2dee14cce2b6e10e64301500cc0 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 14 Mar 2018 16:45:09 -0700 Subject: [PATCH] Generated from 189d112e0d578ff72b4e4531174f8d3c80c0b2f3 (#2176) [Monitor] Fixing incorrect specification of top parameter for Metrics API (#2655) --- .../azure/mgmt/monitor/models/__init__.py | 224 ++++++++++++------ .../monitor/models/action_group_patch_body.py | 8 +- .../models/action_group_patch_body_py3.py | 34 +++ .../monitor/models/action_group_resource.py | 32 +-- .../models/action_group_resource_py3.py | 96 ++++++++ .../models/activity_log_alert_action_group.py | 14 +- .../activity_log_alert_action_group_py3.py | 40 ++++ .../models/activity_log_alert_action_list.py | 6 +- .../activity_log_alert_action_list_py3.py | 29 +++ .../activity_log_alert_all_of_condition.py | 10 +- ...activity_log_alert_all_of_condition_py3.py | 36 +++ .../activity_log_alert_leaf_condition.py | 22 +- .../activity_log_alert_leaf_condition_py3.py | 45 ++++ .../models/activity_log_alert_patch_body.py | 8 +- .../activity_log_alert_patch_body_py3.py | 34 +++ .../models/activity_log_alert_resource.py | 31 ++- .../models/activity_log_alert_resource_py3.py | 81 +++++++ .../monitor/models/alert_rule_resource.py | 28 ++- .../models/alert_rule_resource_patch.py | 28 ++- .../models/alert_rule_resource_patch_py3.py | 68 ++++++ .../monitor/models/alert_rule_resource_py3.py | 83 +++++++ .../models/automation_runbook_receiver.py | 32 +-- .../models/automation_runbook_receiver_py3.py | 60 +++++ .../monitor/models/autoscale_notification.py | 14 +- .../models/autoscale_notification_py3.py | 47 ++++ .../mgmt/monitor/models/autoscale_profile.py | 27 ++- .../monitor/models/autoscale_profile_py3.py | 57 +++++ .../models/autoscale_setting_resource.py | 24 +- .../autoscale_setting_resource_patch.py | 24 +- .../autoscale_setting_resource_patch_py3.py | 60 +++++ .../models/autoscale_setting_resource_py3.py | 78 ++++++ .../monitor/models/azure_app_push_receiver.py | 18 +- .../models/azure_app_push_receiver_py3.py | 41 ++++ .../azure/mgmt/monitor/models/baseline.py | 20 +- .../monitor/models/baseline_metadata_value.py | 8 +- .../models/baseline_metadata_value_py3.py | 32 +++ .../azure/mgmt/monitor/models/baseline_py3.py | 45 ++++ .../mgmt/monitor/models/baseline_response.py | 16 +- .../monitor/models/baseline_response_py3.py | 76 ++++++ .../models/calculate_baseline_response.py | 16 +- .../models/calculate_baseline_response_py3.py | 43 ++++ .../diagnostic_settings_category_resource.py | 6 +- ...c_settings_category_resource_collection.py | 6 +- ...ttings_category_resource_collection_py3.py | 29 +++ ...agnostic_settings_category_resource_py3.py | 47 ++++ .../models/diagnostic_settings_resource.py | 16 +- ...diagnostic_settings_resource_collection.py | 6 +- ...nostic_settings_resource_collection_py3.py | 28 +++ .../diagnostic_settings_resource_py3.py | 72 ++++++ .../mgmt/monitor/models/email_notification.py | 10 +- .../monitor/models/email_notification_py3.py | 39 +++ .../mgmt/monitor/models/email_receiver.py | 16 +- .../mgmt/monitor/models/email_receiver_py3.py | 49 ++++ .../mgmt/monitor/models/enable_request.py | 10 +- .../mgmt/monitor/models/enable_request_py3.py | 34 +++ .../mgmt/monitor/models/error_response.py | 8 +- .../mgmt/monitor/models/error_response_py3.py | 45 ++++ .../azure/mgmt/monitor/models/event_data.py | 4 +- .../mgmt/monitor/models/event_data_py3.py | 181 ++++++++++++++ .../mgmt/monitor/models/http_request_info.py | 12 +- .../monitor/models/http_request_info_py3.py | 40 ++++ .../azure/mgmt/monitor/models/incident.py | 4 +- .../azure/mgmt/monitor/models/incident_py3.py | 58 +++++ .../mgmt/monitor/models/itsm_receiver.py | 33 +-- .../mgmt/monitor/models/itsm_receiver_py3.py | 59 +++++ .../mgmt/monitor/models/localizable_string.py | 12 +- .../monitor/models/localizable_string_py3.py | 38 +++ .../location_threshold_rule_condition.py | 16 +- .../location_threshold_rule_condition_py3.py | 50 ++++ .../monitor/models/log_profile_resource.py | 33 +-- .../models/log_profile_resource_patch.py | 33 +-- .../models/log_profile_resource_patch_py3.py | 65 +++++ .../models/log_profile_resource_py3.py | 83 +++++++ .../azure/mgmt/monitor/models/log_settings.py | 14 +- .../mgmt/monitor/models/log_settings_py3.py | 46 ++++ .../management_event_aggregation_condition.py | 10 +- ...agement_event_aggregation_condition_py3.py | 39 +++ .../models/management_event_rule_condition.py | 10 +- .../management_event_rule_condition_py3.py | 46 ++++ .../mgmt/monitor/models/metadata_value.py | 8 +- .../mgmt/monitor/models/metadata_value_py3.py | 32 +++ .../azure/mgmt/monitor/models/metric.py | 32 +-- .../monitor/models/metric_availability.py | 8 +- .../monitor/models/metric_availability_py3.py | 35 +++ .../mgmt/monitor/models/metric_definition.py | 24 +- .../monitor/models/metric_definition_py3.py | 77 ++++++ .../azure/mgmt/monitor/models/metric_py3.py | 58 +++++ .../mgmt/monitor/models/metric_settings.py | 17 +- .../monitor/models/metric_settings_py3.py | 51 ++++ .../mgmt/monitor/models/metric_trigger.py | 64 ++--- .../mgmt/monitor/models/metric_trigger_py3.py | 85 +++++++ .../azure/mgmt/monitor/models/metric_value.py | 21 +- .../mgmt/monitor/models/metric_value_py3.py | 56 +++++ .../models/monitor_management_client_enums.py | 30 +-- .../azure/mgmt/monitor/models/operation.py | 8 +- .../mgmt/monitor/models/operation_display.py | 10 +- .../monitor/models/operation_display_py3.py | 37 +++ .../monitor/models/operation_list_result.py | 8 +- .../models/operation_list_result_py3.py | 35 +++ .../mgmt/monitor/models/operation_py3.py | 32 +++ .../monitor/models/proxy_only_resource.py | 4 +- .../monitor/models/proxy_only_resource_py3.py | 45 ++++ .../azure/mgmt/monitor/models/recurrence.py | 21 +- .../mgmt/monitor/models/recurrence_py3.py | 44 ++++ .../mgmt/monitor/models/recurrent_schedule.py | 104 ++++---- .../monitor/models/recurrent_schedule_py3.py | 90 +++++++ .../azure/mgmt/monitor/models/resource.py | 12 +- .../azure/mgmt/monitor/models/resource_py3.py | 56 +++++ .../azure/mgmt/monitor/models/response.py | 26 +- .../azure/mgmt/monitor/models/response_py3.py | 64 +++++ .../mgmt/monitor/models/retention_policy.py | 18 +- .../monitor/models/retention_policy_py3.py | 41 ++++ .../azure/mgmt/monitor/models/rule_action.py | 8 +- .../mgmt/monitor/models/rule_action_py3.py | 42 ++++ .../mgmt/monitor/models/rule_condition.py | 10 +- .../mgmt/monitor/models/rule_condition_py3.py | 47 ++++ .../mgmt/monitor/models/rule_data_source.py | 10 +- .../monitor/models/rule_data_source_py3.py | 46 ++++ .../mgmt/monitor/models/rule_email_action.py | 12 +- .../monitor/models/rule_email_action_py3.py | 46 ++++ ...ule_management_event_claims_data_source.py | 6 +- ...management_event_claims_data_source_py3.py | 28 +++ .../rule_management_event_data_source.py | 26 +- .../rule_management_event_data_source_py3.py | 78 ++++++ .../monitor/models/rule_metric_data_source.py | 10 +- .../models/rule_metric_data_source_py3.py | 44 ++++ .../monitor/models/rule_webhook_action.py | 12 +- .../monitor/models/rule_webhook_action_py3.py | 45 ++++ .../azure/mgmt/monitor/models/scale_action.py | 30 +-- .../mgmt/monitor/models/scale_action_py3.py | 56 +++++ .../mgmt/monitor/models/scale_capacity.py | 27 ++- .../mgmt/monitor/models/scale_capacity_py3.py | 49 ++++ .../azure/mgmt/monitor/models/scale_rule.py | 15 +- .../mgmt/monitor/models/scale_rule_py3.py | 40 ++++ .../monitor/models/sender_authorization.py | 10 +- .../models/sender_authorization_py3.py | 39 +++ .../azure/mgmt/monitor/models/sms_receiver.py | 20 +- .../mgmt/monitor/models/sms_receiver_py3.py | 54 +++++ .../models/threshold_rule_condition.py | 24 +- .../models/threshold_rule_condition_py3.py | 64 +++++ .../monitor/models/time_series_element.py | 8 +- .../monitor/models/time_series_element_py3.py | 35 +++ .../monitor/models/time_series_information.py | 18 +- .../models/time_series_information_py3.py | 44 ++++ .../azure/mgmt/monitor/models/time_window.py | 16 +- .../mgmt/monitor/models/time_window_py3.py | 80 +++++++ .../monitor/models/webhook_notification.py | 8 +- .../models/webhook_notification_py3.py | 32 +++ .../mgmt/monitor/models/webhook_receiver.py | 16 +- .../monitor/models/webhook_receiver_py3.py | 40 ++++ .../monitor/operations/metrics_operations.py | 4 +- 151 files changed, 4760 insertions(+), 694 deletions(-) create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/error_response_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/event_data_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/incident_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/metric_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/operation_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/response_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/time_window_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver_py3.py diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py index 8f9add947966..f0a59de93e28 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py @@ -9,80 +9,156 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource -from .scale_capacity import ScaleCapacity -from .metric_trigger import MetricTrigger -from .scale_action import ScaleAction -from .scale_rule import ScaleRule -from .time_window import TimeWindow -from .recurrent_schedule import RecurrentSchedule -from .recurrence import Recurrence -from .autoscale_profile import AutoscaleProfile -from .email_notification import EmailNotification -from .webhook_notification import WebhookNotification -from .autoscale_notification import AutoscaleNotification -from .autoscale_setting_resource import AutoscaleSettingResource -from .autoscale_setting_resource_patch import AutoscaleSettingResourcePatch -from .error_response import ErrorResponse, ErrorResponseException -from .operation_display import OperationDisplay -from .operation import Operation -from .operation_list_result import OperationListResult -from .incident import Incident -from .rule_data_source import RuleDataSource -from .rule_condition import RuleCondition -from .rule_metric_data_source import RuleMetricDataSource -from .rule_management_event_claims_data_source import RuleManagementEventClaimsDataSource -from .rule_management_event_data_source import RuleManagementEventDataSource -from .threshold_rule_condition import ThresholdRuleCondition -from .location_threshold_rule_condition import LocationThresholdRuleCondition -from .management_event_aggregation_condition import ManagementEventAggregationCondition -from .management_event_rule_condition import ManagementEventRuleCondition -from .rule_action import RuleAction -from .rule_email_action import RuleEmailAction -from .rule_webhook_action import RuleWebhookAction -from .alert_rule_resource import AlertRuleResource -from .alert_rule_resource_patch import AlertRuleResourcePatch -from .retention_policy import RetentionPolicy -from .log_profile_resource import LogProfileResource -from .log_profile_resource_patch import LogProfileResourcePatch -from .proxy_only_resource import ProxyOnlyResource -from .metric_settings import MetricSettings -from .log_settings import LogSettings -from .diagnostic_settings_resource import DiagnosticSettingsResource -from .diagnostic_settings_resource_collection import DiagnosticSettingsResourceCollection -from .diagnostic_settings_category_resource import DiagnosticSettingsCategoryResource -from .diagnostic_settings_category_resource_collection import DiagnosticSettingsCategoryResourceCollection -from .email_receiver import EmailReceiver -from .sms_receiver import SmsReceiver -from .webhook_receiver import WebhookReceiver -from .itsm_receiver import ItsmReceiver -from .azure_app_push_receiver import AzureAppPushReceiver -from .automation_runbook_receiver import AutomationRunbookReceiver -from .action_group_resource import ActionGroupResource -from .enable_request import EnableRequest -from .action_group_patch_body import ActionGroupPatchBody -from .activity_log_alert_leaf_condition import ActivityLogAlertLeafCondition -from .activity_log_alert_all_of_condition import ActivityLogAlertAllOfCondition -from .activity_log_alert_action_group import ActivityLogAlertActionGroup -from .activity_log_alert_action_list import ActivityLogAlertActionList -from .activity_log_alert_resource import ActivityLogAlertResource -from .activity_log_alert_patch_body import ActivityLogAlertPatchBody -from .localizable_string import LocalizableString -from .sender_authorization import SenderAuthorization -from .http_request_info import HttpRequestInfo -from .event_data import EventData -from .metric_availability import MetricAvailability -from .metric_definition import MetricDefinition -from .metric_value import MetricValue -from .metadata_value import MetadataValue -from .time_series_element import TimeSeriesElement -from .metric import Metric -from .response import Response -from .baseline_metadata_value import BaselineMetadataValue -from .baseline import Baseline -from .baseline_response import BaselineResponse -from .time_series_information import TimeSeriesInformation -from .calculate_baseline_response import CalculateBaselineResponse +try: + from .resource_py3 import Resource + from .scale_capacity_py3 import ScaleCapacity + from .metric_trigger_py3 import MetricTrigger + from .scale_action_py3 import ScaleAction + from .scale_rule_py3 import ScaleRule + from .time_window_py3 import TimeWindow + from .recurrent_schedule_py3 import RecurrentSchedule + from .recurrence_py3 import Recurrence + from .autoscale_profile_py3 import AutoscaleProfile + from .email_notification_py3 import EmailNotification + from .webhook_notification_py3 import WebhookNotification + from .autoscale_notification_py3 import AutoscaleNotification + from .autoscale_setting_resource_py3 import AutoscaleSettingResource + from .autoscale_setting_resource_patch_py3 import AutoscaleSettingResourcePatch + from .error_response_py3 import ErrorResponse, ErrorResponseException + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .operation_list_result_py3 import OperationListResult + from .incident_py3 import Incident + from .rule_data_source_py3 import RuleDataSource + from .rule_condition_py3 import RuleCondition + from .rule_metric_data_source_py3 import RuleMetricDataSource + from .rule_management_event_claims_data_source_py3 import RuleManagementEventClaimsDataSource + from .rule_management_event_data_source_py3 import RuleManagementEventDataSource + from .threshold_rule_condition_py3 import ThresholdRuleCondition + from .location_threshold_rule_condition_py3 import LocationThresholdRuleCondition + from .management_event_aggregation_condition_py3 import ManagementEventAggregationCondition + from .management_event_rule_condition_py3 import ManagementEventRuleCondition + from .rule_action_py3 import RuleAction + from .rule_email_action_py3 import RuleEmailAction + from .rule_webhook_action_py3 import RuleWebhookAction + from .alert_rule_resource_py3 import AlertRuleResource + from .alert_rule_resource_patch_py3 import AlertRuleResourcePatch + from .retention_policy_py3 import RetentionPolicy + from .log_profile_resource_py3 import LogProfileResource + from .log_profile_resource_patch_py3 import LogProfileResourcePatch + from .proxy_only_resource_py3 import ProxyOnlyResource + from .metric_settings_py3 import MetricSettings + from .log_settings_py3 import LogSettings + from .diagnostic_settings_resource_py3 import DiagnosticSettingsResource + from .diagnostic_settings_resource_collection_py3 import DiagnosticSettingsResourceCollection + from .diagnostic_settings_category_resource_py3 import DiagnosticSettingsCategoryResource + from .diagnostic_settings_category_resource_collection_py3 import DiagnosticSettingsCategoryResourceCollection + from .email_receiver_py3 import EmailReceiver + from .sms_receiver_py3 import SmsReceiver + from .webhook_receiver_py3 import WebhookReceiver + from .itsm_receiver_py3 import ItsmReceiver + from .azure_app_push_receiver_py3 import AzureAppPushReceiver + from .automation_runbook_receiver_py3 import AutomationRunbookReceiver + from .action_group_resource_py3 import ActionGroupResource + from .enable_request_py3 import EnableRequest + from .action_group_patch_body_py3 import ActionGroupPatchBody + from .activity_log_alert_leaf_condition_py3 import ActivityLogAlertLeafCondition + from .activity_log_alert_all_of_condition_py3 import ActivityLogAlertAllOfCondition + from .activity_log_alert_action_group_py3 import ActivityLogAlertActionGroup + from .activity_log_alert_action_list_py3 import ActivityLogAlertActionList + from .activity_log_alert_resource_py3 import ActivityLogAlertResource + from .activity_log_alert_patch_body_py3 import ActivityLogAlertPatchBody + from .localizable_string_py3 import LocalizableString + from .sender_authorization_py3 import SenderAuthorization + from .http_request_info_py3 import HttpRequestInfo + from .event_data_py3 import EventData + from .metric_availability_py3 import MetricAvailability + from .metric_definition_py3 import MetricDefinition + from .metric_value_py3 import MetricValue + from .metadata_value_py3 import MetadataValue + from .time_series_element_py3 import TimeSeriesElement + from .metric_py3 import Metric + from .response_py3 import Response + from .baseline_metadata_value_py3 import BaselineMetadataValue + from .baseline_py3 import Baseline + from .baseline_response_py3 import BaselineResponse + from .time_series_information_py3 import TimeSeriesInformation + from .calculate_baseline_response_py3 import CalculateBaselineResponse +except (SyntaxError, ImportError): + from .resource import Resource + from .scale_capacity import ScaleCapacity + from .metric_trigger import MetricTrigger + from .scale_action import ScaleAction + from .scale_rule import ScaleRule + from .time_window import TimeWindow + from .recurrent_schedule import RecurrentSchedule + from .recurrence import Recurrence + from .autoscale_profile import AutoscaleProfile + from .email_notification import EmailNotification + from .webhook_notification import WebhookNotification + from .autoscale_notification import AutoscaleNotification + from .autoscale_setting_resource import AutoscaleSettingResource + from .autoscale_setting_resource_patch import AutoscaleSettingResourcePatch + from .error_response import ErrorResponse, ErrorResponseException + from .operation_display import OperationDisplay + from .operation import Operation + from .operation_list_result import OperationListResult + from .incident import Incident + from .rule_data_source import RuleDataSource + from .rule_condition import RuleCondition + from .rule_metric_data_source import RuleMetricDataSource + from .rule_management_event_claims_data_source import RuleManagementEventClaimsDataSource + from .rule_management_event_data_source import RuleManagementEventDataSource + from .threshold_rule_condition import ThresholdRuleCondition + from .location_threshold_rule_condition import LocationThresholdRuleCondition + from .management_event_aggregation_condition import ManagementEventAggregationCondition + from .management_event_rule_condition import ManagementEventRuleCondition + from .rule_action import RuleAction + from .rule_email_action import RuleEmailAction + from .rule_webhook_action import RuleWebhookAction + from .alert_rule_resource import AlertRuleResource + from .alert_rule_resource_patch import AlertRuleResourcePatch + from .retention_policy import RetentionPolicy + from .log_profile_resource import LogProfileResource + from .log_profile_resource_patch import LogProfileResourcePatch + from .proxy_only_resource import ProxyOnlyResource + from .metric_settings import MetricSettings + from .log_settings import LogSettings + from .diagnostic_settings_resource import DiagnosticSettingsResource + from .diagnostic_settings_resource_collection import DiagnosticSettingsResourceCollection + from .diagnostic_settings_category_resource import DiagnosticSettingsCategoryResource + from .diagnostic_settings_category_resource_collection import DiagnosticSettingsCategoryResourceCollection + from .email_receiver import EmailReceiver + from .sms_receiver import SmsReceiver + from .webhook_receiver import WebhookReceiver + from .itsm_receiver import ItsmReceiver + from .azure_app_push_receiver import AzureAppPushReceiver + from .automation_runbook_receiver import AutomationRunbookReceiver + from .action_group_resource import ActionGroupResource + from .enable_request import EnableRequest + from .action_group_patch_body import ActionGroupPatchBody + from .activity_log_alert_leaf_condition import ActivityLogAlertLeafCondition + from .activity_log_alert_all_of_condition import ActivityLogAlertAllOfCondition + from .activity_log_alert_action_group import ActivityLogAlertActionGroup + from .activity_log_alert_action_list import ActivityLogAlertActionList + from .activity_log_alert_resource import ActivityLogAlertResource + from .activity_log_alert_patch_body import ActivityLogAlertPatchBody + from .localizable_string import LocalizableString + from .sender_authorization import SenderAuthorization + from .http_request_info import HttpRequestInfo + from .event_data import EventData + from .metric_availability import MetricAvailability + from .metric_definition import MetricDefinition + from .metric_value import MetricValue + from .metadata_value import MetadataValue + from .time_series_element import TimeSeriesElement + from .metric import Metric + from .response import Response + from .baseline_metadata_value import BaselineMetadataValue + from .baseline import Baseline + from .baseline_response import BaselineResponse + from .time_series_information import TimeSeriesInformation + from .calculate_baseline_response import CalculateBaselineResponse from .autoscale_setting_resource_paged import AutoscaleSettingResourcePaged from .incident_paged import IncidentPaged from .alert_rule_resource_paged import AlertRuleResourcePaged diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body.py index a17c4984ec0c..5c4c2016543a 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body.py @@ -28,7 +28,7 @@ class ActionGroupPatchBody(Model): 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, } - def __init__(self, tags=None, enabled=True): - super(ActionGroupPatchBody, self).__init__() - self.tags = tags - self.enabled = enabled + def __init__(self, **kwargs): + super(ActionGroupPatchBody, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.enabled = kwargs.get('enabled', True) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body_py3.py new file mode 100644 index 000000000000..9840a35ee526 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ActionGroupPatchBody(Model): + """An action group object for the body of patch operations. + + :param tags: Resource tags + :type tags: dict[str, str] + :param enabled: Indicates whether this action group is enabled. If an + action group is not enabled, then none of its actions will be activated. + Default value: True . + :type enabled: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, *, tags=None, enabled: bool=True, **kwargs) -> None: + super(ActionGroupPatchBody, self).__init__(**kwargs) + self.tags = tags + self.enabled = enabled diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py index 9d4b8d20865e..4cdf16d25a2d 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py @@ -18,21 +18,23 @@ class ActionGroupResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id :vartype id: str :ivar name: Azure resource name :vartype name: str :ivar type: Azure resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags :type tags: dict[str, str] - :param group_short_name: The short name of the action group. This will be - used in SMS messages. + :param group_short_name: Required. The short name of the action group. + This will be used in SMS messages. :type group_short_name: str - :param enabled: Indicates whether this action group is enabled. If an - action group is not enabled, then none of its receivers will receive + :param enabled: Required. Indicates whether this action group is enabled. + If an action group is not enabled, then none of its receivers will receive communications. Default value: True . :type enabled: bool :param email_receivers: The list of email receivers that are part of this @@ -82,13 +84,13 @@ class ActionGroupResource(Resource): 'automation_runbook_receivers': {'key': 'properties.automationRunbookReceivers', 'type': '[AutomationRunbookReceiver]'}, } - def __init__(self, location, group_short_name, tags=None, enabled=True, email_receivers=None, sms_receivers=None, webhook_receivers=None, itsm_receivers=None, azure_app_push_receivers=None, automation_runbook_receivers=None): - super(ActionGroupResource, self).__init__(location=location, tags=tags) - self.group_short_name = group_short_name - self.enabled = enabled - self.email_receivers = email_receivers - self.sms_receivers = sms_receivers - self.webhook_receivers = webhook_receivers - self.itsm_receivers = itsm_receivers - self.azure_app_push_receivers = azure_app_push_receivers - self.automation_runbook_receivers = automation_runbook_receivers + def __init__(self, **kwargs): + super(ActionGroupResource, self).__init__(**kwargs) + self.group_short_name = kwargs.get('group_short_name', None) + self.enabled = kwargs.get('enabled', True) + self.email_receivers = kwargs.get('email_receivers', None) + self.sms_receivers = kwargs.get('sms_receivers', None) + self.webhook_receivers = kwargs.get('webhook_receivers', None) + self.itsm_receivers = kwargs.get('itsm_receivers', None) + self.azure_app_push_receivers = kwargs.get('azure_app_push_receivers', None) + self.automation_runbook_receivers = kwargs.get('automation_runbook_receivers', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource_py3.py new file mode 100644 index 000000000000..fdd6a95d4f1a --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource_py3.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ActionGroupResource(Resource): + """An action group resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param group_short_name: Required. The short name of the action group. + This will be used in SMS messages. + :type group_short_name: str + :param enabled: Required. Indicates whether this action group is enabled. + If an action group is not enabled, then none of its receivers will receive + communications. Default value: True . + :type enabled: bool + :param email_receivers: The list of email receivers that are part of this + action group. + :type email_receivers: list[~azure.mgmt.monitor.models.EmailReceiver] + :param sms_receivers: The list of SMS receivers that are part of this + action group. + :type sms_receivers: list[~azure.mgmt.monitor.models.SmsReceiver] + :param webhook_receivers: The list of webhook receivers that are part of + this action group. + :type webhook_receivers: list[~azure.mgmt.monitor.models.WebhookReceiver] + :param itsm_receivers: The list of ITSM receivers that are part of this + action group. + :type itsm_receivers: list[~azure.mgmt.monitor.models.ItsmReceiver] + :param azure_app_push_receivers: The list of AzureAppPush receivers that + are part of this action group. + :type azure_app_push_receivers: + list[~azure.mgmt.monitor.models.AzureAppPushReceiver] + :param automation_runbook_receivers: The list of AutomationRunbook + receivers that are part of this action group. + :type automation_runbook_receivers: + list[~azure.mgmt.monitor.models.AutomationRunbookReceiver] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'group_short_name': {'required': True, 'max_length': 15}, + 'enabled': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'group_short_name': {'key': 'properties.groupShortName', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'email_receivers': {'key': 'properties.emailReceivers', 'type': '[EmailReceiver]'}, + 'sms_receivers': {'key': 'properties.smsReceivers', 'type': '[SmsReceiver]'}, + 'webhook_receivers': {'key': 'properties.webhookReceivers', 'type': '[WebhookReceiver]'}, + 'itsm_receivers': {'key': 'properties.itsmReceivers', 'type': '[ItsmReceiver]'}, + 'azure_app_push_receivers': {'key': 'properties.azureAppPushReceivers', 'type': '[AzureAppPushReceiver]'}, + 'automation_runbook_receivers': {'key': 'properties.automationRunbookReceivers', 'type': '[AutomationRunbookReceiver]'}, + } + + def __init__(self, *, location: str, group_short_name: str, tags=None, enabled: bool=True, email_receivers=None, sms_receivers=None, webhook_receivers=None, itsm_receivers=None, azure_app_push_receivers=None, automation_runbook_receivers=None, **kwargs) -> None: + super(ActionGroupResource, self).__init__(location=location, tags=tags, **kwargs) + self.group_short_name = group_short_name + self.enabled = enabled + self.email_receivers = email_receivers + self.sms_receivers = sms_receivers + self.webhook_receivers = webhook_receivers + self.itsm_receivers = itsm_receivers + self.azure_app_push_receivers = azure_app_push_receivers + self.automation_runbook_receivers = automation_runbook_receivers diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group.py index fbd7cad9b61a..e1594897e5cc 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group.py @@ -15,8 +15,10 @@ class ActivityLogAlertActionGroup(Model): """A pointer to an Azure Action Group. - :param action_group_id: The resourceId of the action group. This cannot be - null or empty. + All required parameters must be populated in order to send to Azure. + + :param action_group_id: Required. The resourceId of the action group. This + cannot be null or empty. :type action_group_id: str :param webhook_properties: the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload. @@ -32,7 +34,7 @@ class ActivityLogAlertActionGroup(Model): 'webhook_properties': {'key': 'webhookProperties', 'type': '{str}'}, } - def __init__(self, action_group_id, webhook_properties=None): - super(ActivityLogAlertActionGroup, self).__init__() - self.action_group_id = action_group_id - self.webhook_properties = webhook_properties + def __init__(self, **kwargs): + super(ActivityLogAlertActionGroup, self).__init__(**kwargs) + self.action_group_id = kwargs.get('action_group_id', None) + self.webhook_properties = kwargs.get('webhook_properties', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group_py3.py new file mode 100644 index 000000000000..b138c3d966d6 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ActivityLogAlertActionGroup(Model): + """A pointer to an Azure Action Group. + + All required parameters must be populated in order to send to Azure. + + :param action_group_id: Required. The resourceId of the action group. This + cannot be null or empty. + :type action_group_id: str + :param webhook_properties: the dictionary of custom properties to include + with the post operation. These data are appended to the webhook payload. + :type webhook_properties: dict[str, str] + """ + + _validation = { + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + 'webhook_properties': {'key': 'webhookProperties', 'type': '{str}'}, + } + + def __init__(self, *, action_group_id: str, webhook_properties=None, **kwargs) -> None: + super(ActivityLogAlertActionGroup, self).__init__(**kwargs) + self.action_group_id = action_group_id + self.webhook_properties = webhook_properties diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list.py index 93e89bf58cff..7fb9b68880fc 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list.py @@ -24,6 +24,6 @@ class ActivityLogAlertActionList(Model): 'action_groups': {'key': 'actionGroups', 'type': '[ActivityLogAlertActionGroup]'}, } - def __init__(self, action_groups=None): - super(ActivityLogAlertActionList, self).__init__() - self.action_groups = action_groups + def __init__(self, **kwargs): + super(ActivityLogAlertActionList, self).__init__(**kwargs) + self.action_groups = kwargs.get('action_groups', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list_py3.py new file mode 100644 index 000000000000..c5e38e2fe62f --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ActivityLogAlertActionList(Model): + """A list of activity log alert actions. + + :param action_groups: The list of activity log alerts. + :type action_groups: + list[~azure.mgmt.monitor.models.ActivityLogAlertActionGroup] + """ + + _attribute_map = { + 'action_groups': {'key': 'actionGroups', 'type': '[ActivityLogAlertActionGroup]'}, + } + + def __init__(self, *, action_groups=None, **kwargs) -> None: + super(ActivityLogAlertActionList, self).__init__(**kwargs) + self.action_groups = action_groups diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition.py index bdcd86017bfb..0ba82fb32498 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition.py @@ -16,7 +16,9 @@ class ActivityLogAlertAllOfCondition(Model): """An Activity Log alert condition that is met when all its member conditions are met. - :param all_of: The list of activity log alert conditions. + All required parameters must be populated in order to send to Azure. + + :param all_of: Required. The list of activity log alert conditions. :type all_of: list[~azure.mgmt.monitor.models.ActivityLogAlertLeafCondition] """ @@ -29,6 +31,6 @@ class ActivityLogAlertAllOfCondition(Model): 'all_of': {'key': 'allOf', 'type': '[ActivityLogAlertLeafCondition]'}, } - def __init__(self, all_of): - super(ActivityLogAlertAllOfCondition, self).__init__() - self.all_of = all_of + def __init__(self, **kwargs): + super(ActivityLogAlertAllOfCondition, self).__init__(**kwargs) + self.all_of = kwargs.get('all_of', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition_py3.py new file mode 100644 index 000000000000..e9a59663a2ce --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ActivityLogAlertAllOfCondition(Model): + """An Activity Log alert condition that is met when all its member conditions + are met. + + All required parameters must be populated in order to send to Azure. + + :param all_of: Required. The list of activity log alert conditions. + :type all_of: + list[~azure.mgmt.monitor.models.ActivityLogAlertLeafCondition] + """ + + _validation = { + 'all_of': {'required': True}, + } + + _attribute_map = { + 'all_of': {'key': 'allOf', 'type': '[ActivityLogAlertLeafCondition]'}, + } + + def __init__(self, *, all_of, **kwargs) -> None: + super(ActivityLogAlertAllOfCondition, self).__init__(**kwargs) + self.all_of = all_of diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition.py index d31f514e88b7..682dada893dc 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition.py @@ -16,13 +16,15 @@ class ActivityLogAlertLeafCondition(Model): """An Activity Log alert condition that is met by comparing an activity log field and value. - :param field: The name of the field that this condition will examine. The - possible values for this field are (case-insensitive): 'resourceId', - 'category', 'caller', 'level', 'operationName', 'resourceGroup', - 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything - beginning with 'properties.'. + All required parameters must be populated in order to send to Azure. + + :param field: Required. The name of the field that this condition will + examine. The possible values for this field are (case-insensitive): + 'resourceId', 'category', 'caller', 'level', 'operationName', + 'resourceGroup', 'resourceProvider', 'status', 'subStatus', + 'resourceType', or anything beginning with 'properties.'. :type field: str - :param equals: The field value will be compared to this value + :param equals: Required. The field value will be compared to this value (case-insensitive) to determine if the condition is met. :type equals: str """ @@ -37,7 +39,7 @@ class ActivityLogAlertLeafCondition(Model): 'equals': {'key': 'equals', 'type': 'str'}, } - def __init__(self, field, equals): - super(ActivityLogAlertLeafCondition, self).__init__() - self.field = field - self.equals = equals + def __init__(self, **kwargs): + super(ActivityLogAlertLeafCondition, self).__init__(**kwargs) + self.field = kwargs.get('field', None) + self.equals = kwargs.get('equals', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition_py3.py new file mode 100644 index 000000000000..ddab0eec0048 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ActivityLogAlertLeafCondition(Model): + """An Activity Log alert condition that is met by comparing an activity log + field and value. + + All required parameters must be populated in order to send to Azure. + + :param field: Required. The name of the field that this condition will + examine. The possible values for this field are (case-insensitive): + 'resourceId', 'category', 'caller', 'level', 'operationName', + 'resourceGroup', 'resourceProvider', 'status', 'subStatus', + 'resourceType', or anything beginning with 'properties.'. + :type field: str + :param equals: Required. The field value will be compared to this value + (case-insensitive) to determine if the condition is met. + :type equals: str + """ + + _validation = { + 'field': {'required': True}, + 'equals': {'required': True}, + } + + _attribute_map = { + 'field': {'key': 'field', 'type': 'str'}, + 'equals': {'key': 'equals', 'type': 'str'}, + } + + def __init__(self, *, field: str, equals: str, **kwargs) -> None: + super(ActivityLogAlertLeafCondition, self).__init__(**kwargs) + self.field = field + self.equals = equals diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body.py index 37cb2aef8ac8..904b640b483e 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body.py @@ -28,7 +28,7 @@ class ActivityLogAlertPatchBody(Model): 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, } - def __init__(self, tags=None, enabled=True): - super(ActivityLogAlertPatchBody, self).__init__() - self.tags = tags - self.enabled = enabled + def __init__(self, **kwargs): + super(ActivityLogAlertPatchBody, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.enabled = kwargs.get('enabled', True) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body_py3.py new file mode 100644 index 000000000000..886a84337990 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ActivityLogAlertPatchBody(Model): + """An activity log alert object for the body of patch operations. + + :param tags: Resource tags + :type tags: dict[str, str] + :param enabled: Indicates whether this activity log alert is enabled. If + an activity log alert is not enabled, then none of its actions will be + activated. Default value: True . + :type enabled: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, *, tags=None, enabled: bool=True, **kwargs) -> None: + super(ActivityLogAlertPatchBody, self).__init__(**kwargs) + self.tags = tags + self.enabled = enabled diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource.py index c27273a5df87..6fe9ff307863 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource.py @@ -18,27 +18,32 @@ class ActivityLogAlertResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id :vartype id: str :ivar name: Azure resource name :vartype name: str :ivar type: Azure resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags :type tags: dict[str, str] - :param scopes: A list of resourceIds that will be used as prefixes. The - alert will only apply to activityLogs with resourceIds that fall under one - of these prefixes. This list must include at least one item. + :param scopes: Required. A list of resourceIds that will be used as + prefixes. The alert will only apply to activityLogs with resourceIds that + fall under one of these prefixes. This list must include at least one + item. :type scopes: list[str] :param enabled: Indicates whether this activity log alert is enabled. If an activity log alert is not enabled, then none of its actions will be activated. Default value: True . :type enabled: bool - :param condition: The condition that will cause this alert to activate. + :param condition: Required. The condition that will cause this alert to + activate. :type condition: ~azure.mgmt.monitor.models.ActivityLogAlertAllOfCondition - :param actions: The actions that will activate when the condition is met. + :param actions: Required. The actions that will activate when the + condition is met. :type actions: ~azure.mgmt.monitor.models.ActivityLogAlertActionList :param description: A description of this activity log alert. :type description: str @@ -67,10 +72,10 @@ class ActivityLogAlertResource(Resource): 'description': {'key': 'properties.description', 'type': 'str'}, } - def __init__(self, location, scopes, condition, actions, tags=None, enabled=True, description=None): - super(ActivityLogAlertResource, self).__init__(location=location, tags=tags) - self.scopes = scopes - self.enabled = enabled - self.condition = condition - self.actions = actions - self.description = description + def __init__(self, **kwargs): + super(ActivityLogAlertResource, self).__init__(**kwargs) + self.scopes = kwargs.get('scopes', None) + self.enabled = kwargs.get('enabled', True) + self.condition = kwargs.get('condition', None) + self.actions = kwargs.get('actions', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource_py3.py new file mode 100644 index 000000000000..bc03347d612d --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource_py3.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ActivityLogAlertResource(Resource): + """An activity log alert resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param scopes: Required. A list of resourceIds that will be used as + prefixes. The alert will only apply to activityLogs with resourceIds that + fall under one of these prefixes. This list must include at least one + item. + :type scopes: list[str] + :param enabled: Indicates whether this activity log alert is enabled. If + an activity log alert is not enabled, then none of its actions will be + activated. Default value: True . + :type enabled: bool + :param condition: Required. The condition that will cause this alert to + activate. + :type condition: ~azure.mgmt.monitor.models.ActivityLogAlertAllOfCondition + :param actions: Required. The actions that will activate when the + condition is met. + :type actions: ~azure.mgmt.monitor.models.ActivityLogAlertActionList + :param description: A description of this activity log alert. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'scopes': {'required': True}, + 'condition': {'required': True}, + 'actions': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'condition': {'key': 'properties.condition', 'type': 'ActivityLogAlertAllOfCondition'}, + 'actions': {'key': 'properties.actions', 'type': 'ActivityLogAlertActionList'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, location: str, scopes, condition, actions, tags=None, enabled: bool=True, description: str=None, **kwargs) -> None: + super(ActivityLogAlertResource, self).__init__(location=location, tags=tags, **kwargs) + self.scopes = scopes + self.enabled = enabled + self.condition = condition + self.actions = actions + self.description = description diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource.py index a7a074fc5038..1ed610f6e0f1 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource.py @@ -18,26 +18,28 @@ class AlertRuleResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id :vartype id: str :ivar name: Azure resource name :vartype name: str :ivar type: Azure resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags :type tags: dict[str, str] - :param alert_rule_resource_name: the name of the alert rule. + :param alert_rule_resource_name: Required. the name of the alert rule. :type alert_rule_resource_name: str :param description: the description of the alert rule that will be included in the alert email. :type description: str - :param is_enabled: the flag that indicates whether the alert rule is - enabled. + :param is_enabled: Required. the flag that indicates whether the alert + rule is enabled. :type is_enabled: bool - :param condition: the condition that results in the alert rule being - activated. + :param condition: Required. the condition that results in the alert rule + being activated. :type condition: ~azure.mgmt.monitor.models.RuleCondition :param actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. @@ -71,11 +73,11 @@ class AlertRuleResource(Resource): 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, } - def __init__(self, location, alert_rule_resource_name, is_enabled, condition, tags=None, description=None, actions=None): - super(AlertRuleResource, self).__init__(location=location, tags=tags) - self.alert_rule_resource_name = alert_rule_resource_name - self.description = description - self.is_enabled = is_enabled - self.condition = condition - self.actions = actions + def __init__(self, **kwargs): + super(AlertRuleResource, self).__init__(**kwargs) + self.alert_rule_resource_name = kwargs.get('alert_rule_resource_name', None) + self.description = kwargs.get('description', None) + self.is_enabled = kwargs.get('is_enabled', None) + self.condition = kwargs.get('condition', None) + self.actions = kwargs.get('actions', None) self.last_updated_time = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch.py index 75d06c07d0c9..c557856b15a9 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch.py @@ -18,18 +18,20 @@ class AlertRuleResourcePatch(Model): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :param tags: Resource tags :type tags: dict[str, str] - :param name: the name of the alert rule. + :param name: Required. the name of the alert rule. :type name: str :param description: the description of the alert rule that will be included in the alert email. :type description: str - :param is_enabled: the flag that indicates whether the alert rule is - enabled. + :param is_enabled: Required. the flag that indicates whether the alert + rule is enabled. :type is_enabled: bool - :param condition: the condition that results in the alert rule being - activated. + :param condition: Required. the condition that results in the alert rule + being activated. :type condition: ~azure.mgmt.monitor.models.RuleCondition :param actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. @@ -55,12 +57,12 @@ class AlertRuleResourcePatch(Model): 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, } - def __init__(self, name, is_enabled, condition, tags=None, description=None, actions=None): - super(AlertRuleResourcePatch, self).__init__() - self.tags = tags - self.name = name - self.description = description - self.is_enabled = is_enabled - self.condition = condition - self.actions = actions + def __init__(self, **kwargs): + super(AlertRuleResourcePatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.is_enabled = kwargs.get('is_enabled', None) + self.condition = kwargs.get('condition', None) + self.actions = kwargs.get('actions', None) self.last_updated_time = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch_py3.py new file mode 100644 index 000000000000..61a979fde502 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AlertRuleResourcePatch(Model): + """The alert rule object for patch operations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param tags: Resource tags + :type tags: dict[str, str] + :param name: Required. the name of the alert rule. + :type name: str + :param description: the description of the alert rule that will be + included in the alert email. + :type description: str + :param is_enabled: Required. the flag that indicates whether the alert + rule is enabled. + :type is_enabled: bool + :param condition: Required. the condition that results in the alert rule + being activated. + :type condition: ~azure.mgmt.monitor.models.RuleCondition + :param actions: the array of actions that are performed when the alert + rule becomes active, and when an alert condition is resolved. + :type actions: list[~azure.mgmt.monitor.models.RuleAction] + :ivar last_updated_time: Last time the rule was updated in ISO8601 format. + :vartype last_updated_time: datetime + """ + + _validation = { + 'name': {'required': True}, + 'is_enabled': {'required': True}, + 'condition': {'required': True}, + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'condition': {'key': 'properties.condition', 'type': 'RuleCondition'}, + 'actions': {'key': 'properties.actions', 'type': '[RuleAction]'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, name: str, is_enabled: bool, condition, tags=None, description: str=None, actions=None, **kwargs) -> None: + super(AlertRuleResourcePatch, self).__init__(**kwargs) + self.tags = tags + self.name = name + self.description = description + self.is_enabled = is_enabled + self.condition = condition + self.actions = actions + self.last_updated_time = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_py3.py new file mode 100644 index 000000000000..83f226b1201d --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class AlertRuleResource(Resource): + """The alert rule resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param alert_rule_resource_name: Required. the name of the alert rule. + :type alert_rule_resource_name: str + :param description: the description of the alert rule that will be + included in the alert email. + :type description: str + :param is_enabled: Required. the flag that indicates whether the alert + rule is enabled. + :type is_enabled: bool + :param condition: Required. the condition that results in the alert rule + being activated. + :type condition: ~azure.mgmt.monitor.models.RuleCondition + :param actions: the array of actions that are performed when the alert + rule becomes active, and when an alert condition is resolved. + :type actions: list[~azure.mgmt.monitor.models.RuleAction] + :ivar last_updated_time: Last time the rule was updated in ISO8601 format. + :vartype last_updated_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'alert_rule_resource_name': {'required': True}, + 'is_enabled': {'required': True}, + 'condition': {'required': True}, + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'alert_rule_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'condition': {'key': 'properties.condition', 'type': 'RuleCondition'}, + 'actions': {'key': 'properties.actions', 'type': '[RuleAction]'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, location: str, alert_rule_resource_name: str, is_enabled: bool, condition, tags=None, description: str=None, actions=None, **kwargs) -> None: + super(AlertRuleResource, self).__init__(location=location, tags=tags, **kwargs) + self.alert_rule_resource_name = alert_rule_resource_name + self.description = description + self.is_enabled = is_enabled + self.condition = condition + self.actions = actions + self.last_updated_time = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver.py index f9061c65f2d8..f7aa0bde67ed 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver.py @@ -15,16 +15,18 @@ class AutomationRunbookReceiver(Model): """The Azure Automation Runbook notification receiver. - :param automation_account_id: The Azure automation account Id which holds - this runbook and authenticate to Azure resource. + All required parameters must be populated in order to send to Azure. + + :param automation_account_id: Required. The Azure automation account Id + which holds this runbook and authenticate to Azure resource. :type automation_account_id: str - :param runbook_name: The name for this runbook. + :param runbook_name: Required. The name for this runbook. :type runbook_name: str - :param webhook_resource_id: The resource id for webhook linked to this - runbook. + :param webhook_resource_id: Required. The resource id for webhook linked + to this runbook. :type webhook_resource_id: str - :param is_global_runbook: Indicates whether this instance is global - runbook. + :param is_global_runbook: Required. Indicates whether this instance is + global runbook. :type is_global_runbook: bool :param name: Indicates name of the webhook. :type name: str @@ -48,11 +50,11 @@ class AutomationRunbookReceiver(Model): 'service_uri': {'key': 'serviceUri', 'type': 'str'}, } - def __init__(self, automation_account_id, runbook_name, webhook_resource_id, is_global_runbook, name=None, service_uri=None): - super(AutomationRunbookReceiver, self).__init__() - self.automation_account_id = automation_account_id - self.runbook_name = runbook_name - self.webhook_resource_id = webhook_resource_id - self.is_global_runbook = is_global_runbook - self.name = name - self.service_uri = service_uri + def __init__(self, **kwargs): + super(AutomationRunbookReceiver, self).__init__(**kwargs) + self.automation_account_id = kwargs.get('automation_account_id', None) + self.runbook_name = kwargs.get('runbook_name', None) + self.webhook_resource_id = kwargs.get('webhook_resource_id', None) + self.is_global_runbook = kwargs.get('is_global_runbook', None) + self.name = kwargs.get('name', None) + self.service_uri = kwargs.get('service_uri', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver_py3.py new file mode 100644 index 000000000000..0367cc1eb750 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutomationRunbookReceiver(Model): + """The Azure Automation Runbook notification receiver. + + All required parameters must be populated in order to send to Azure. + + :param automation_account_id: Required. The Azure automation account Id + which holds this runbook and authenticate to Azure resource. + :type automation_account_id: str + :param runbook_name: Required. The name for this runbook. + :type runbook_name: str + :param webhook_resource_id: Required. The resource id for webhook linked + to this runbook. + :type webhook_resource_id: str + :param is_global_runbook: Required. Indicates whether this instance is + global runbook. + :type is_global_runbook: bool + :param name: Indicates name of the webhook. + :type name: str + :param service_uri: The URI where webhooks should be sent. + :type service_uri: str + """ + + _validation = { + 'automation_account_id': {'required': True}, + 'runbook_name': {'required': True}, + 'webhook_resource_id': {'required': True}, + 'is_global_runbook': {'required': True}, + } + + _attribute_map = { + 'automation_account_id': {'key': 'automationAccountId', 'type': 'str'}, + 'runbook_name': {'key': 'runbookName', 'type': 'str'}, + 'webhook_resource_id': {'key': 'webhookResourceId', 'type': 'str'}, + 'is_global_runbook': {'key': 'isGlobalRunbook', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + } + + def __init__(self, *, automation_account_id: str, runbook_name: str, webhook_resource_id: str, is_global_runbook: bool, name: str=None, service_uri: str=None, **kwargs) -> None: + super(AutomationRunbookReceiver, self).__init__(**kwargs) + self.automation_account_id = automation_account_id + self.runbook_name = runbook_name + self.webhook_resource_id = webhook_resource_id + self.is_global_runbook = is_global_runbook + self.name = name + self.service_uri = service_uri diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification.py index 1e294501f4a5..602508bd4e69 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification.py @@ -18,8 +18,10 @@ class AutoscaleNotification(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar operation: the operation associated with the notification and its - value must be "scale". Default value: "Scale" . + All required parameters must be populated in order to send to Azure. + + :ivar operation: Required. the operation associated with the notification + and its value must be "scale". Default value: "Scale" . :vartype operation: str :param email: the email notification. :type email: ~azure.mgmt.monitor.models.EmailNotification @@ -39,7 +41,7 @@ class AutoscaleNotification(Model): operation = "Scale" - def __init__(self, email=None, webhooks=None): - super(AutoscaleNotification, self).__init__() - self.email = email - self.webhooks = webhooks + def __init__(self, **kwargs): + super(AutoscaleNotification, self).__init__(**kwargs) + self.email = kwargs.get('email', None) + self.webhooks = kwargs.get('webhooks', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification_py3.py new file mode 100644 index 000000000000..0c441f1321fb --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutoscaleNotification(Model): + """Autoscale notification. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar operation: Required. the operation associated with the notification + and its value must be "scale". Default value: "Scale" . + :vartype operation: str + :param email: the email notification. + :type email: ~azure.mgmt.monitor.models.EmailNotification + :param webhooks: the collection of webhook notifications. + :type webhooks: list[~azure.mgmt.monitor.models.WebhookNotification] + """ + + _validation = { + 'operation': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'operation': {'key': 'operation', 'type': 'str'}, + 'email': {'key': 'email', 'type': 'EmailNotification'}, + 'webhooks': {'key': 'webhooks', 'type': '[WebhookNotification]'}, + } + + operation = "Scale" + + def __init__(self, *, email=None, webhooks=None, **kwargs) -> None: + super(AutoscaleNotification, self).__init__(**kwargs) + self.email = email + self.webhooks = webhooks diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile.py index c36998aa1b21..401b6f802543 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile.py @@ -15,13 +15,16 @@ class AutoscaleProfile(Model): """Autoscale profile. - :param name: the name of the profile. + All required parameters must be populated in order to send to Azure. + + :param name: Required. the name of the profile. :type name: str - :param capacity: the number of instances that can be used during this - profile. + :param capacity: Required. the number of instances that can be used during + this profile. :type capacity: ~azure.mgmt.monitor.models.ScaleCapacity - :param rules: the collection of rules that provide the triggers and - parameters for the scaling action. A maximum of 10 rules can be specified. + :param rules: Required. the collection of rules that provide the triggers + and parameters for the scaling action. A maximum of 10 rules can be + specified. :type rules: list[~azure.mgmt.monitor.models.ScaleRule] :param fixed_date: the specific date-time for the profile. This element is not used if the Recurrence element is used. @@ -45,10 +48,10 @@ class AutoscaleProfile(Model): 'recurrence': {'key': 'recurrence', 'type': 'Recurrence'}, } - def __init__(self, name, capacity, rules, fixed_date=None, recurrence=None): - super(AutoscaleProfile, self).__init__() - self.name = name - self.capacity = capacity - self.rules = rules - self.fixed_date = fixed_date - self.recurrence = recurrence + def __init__(self, **kwargs): + super(AutoscaleProfile, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.capacity = kwargs.get('capacity', None) + self.rules = kwargs.get('rules', None) + self.fixed_date = kwargs.get('fixed_date', None) + self.recurrence = kwargs.get('recurrence', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile_py3.py new file mode 100644 index 000000000000..5665e09b1353 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutoscaleProfile(Model): + """Autoscale profile. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. the name of the profile. + :type name: str + :param capacity: Required. the number of instances that can be used during + this profile. + :type capacity: ~azure.mgmt.monitor.models.ScaleCapacity + :param rules: Required. the collection of rules that provide the triggers + and parameters for the scaling action. A maximum of 10 rules can be + specified. + :type rules: list[~azure.mgmt.monitor.models.ScaleRule] + :param fixed_date: the specific date-time for the profile. This element is + not used if the Recurrence element is used. + :type fixed_date: ~azure.mgmt.monitor.models.TimeWindow + :param recurrence: the repeating times at which this profile begins. This + element is not used if the FixedDate element is used. + :type recurrence: ~azure.mgmt.monitor.models.Recurrence + """ + + _validation = { + 'name': {'required': True}, + 'capacity': {'required': True}, + 'rules': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'ScaleCapacity'}, + 'rules': {'key': 'rules', 'type': '[ScaleRule]'}, + 'fixed_date': {'key': 'fixedDate', 'type': 'TimeWindow'}, + 'recurrence': {'key': 'recurrence', 'type': 'Recurrence'}, + } + + def __init__(self, *, name: str, capacity, rules, fixed_date=None, recurrence=None, **kwargs) -> None: + super(AutoscaleProfile, self).__init__(**kwargs) + self.name = name + self.capacity = capacity + self.rules = rules + self.fixed_date = fixed_date + self.recurrence = recurrence diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource.py index b58bb677e7b1..8659f72e634e 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource.py @@ -18,19 +18,21 @@ class AutoscaleSettingResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id :vartype id: str :ivar name: Azure resource name :vartype name: str :ivar type: Azure resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags :type tags: dict[str, str] - :param profiles: the collection of automatic scaling profiles that specify - different scaling parameters for different time periods. A maximum of 20 - profiles can be specified. + :param profiles: Required. the collection of automatic scaling profiles + that specify different scaling parameters for different time periods. A + maximum of 20 profiles can be specified. :type profiles: list[~azure.mgmt.monitor.models.AutoscaleProfile] :param notifications: the collection of notifications. :type notifications: @@ -67,10 +69,10 @@ class AutoscaleSettingResource(Resource): 'target_resource_uri': {'key': 'properties.targetResourceUri', 'type': 'str'}, } - def __init__(self, location, profiles, tags=None, notifications=None, enabled=True, autoscale_setting_resource_name=None, target_resource_uri=None): - super(AutoscaleSettingResource, self).__init__(location=location, tags=tags) - self.profiles = profiles - self.notifications = notifications - self.enabled = enabled - self.autoscale_setting_resource_name = autoscale_setting_resource_name - self.target_resource_uri = target_resource_uri + def __init__(self, **kwargs): + super(AutoscaleSettingResource, self).__init__(**kwargs) + self.profiles = kwargs.get('profiles', None) + self.notifications = kwargs.get('notifications', None) + self.enabled = kwargs.get('enabled', True) + self.autoscale_setting_resource_name = kwargs.get('autoscale_setting_resource_name', None) + self.target_resource_uri = kwargs.get('target_resource_uri', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch.py index d2cad20ddd15..e5dd6ebd6c08 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch.py @@ -15,11 +15,13 @@ class AutoscaleSettingResourcePatch(Model): """The autoscale setting object for patch operations. + All required parameters must be populated in order to send to Azure. + :param tags: Resource tags :type tags: dict[str, str] - :param profiles: the collection of automatic scaling profiles that specify - different scaling parameters for different time periods. A maximum of 20 - profiles can be specified. + :param profiles: Required. the collection of automatic scaling profiles + that specify different scaling parameters for different time periods. A + maximum of 20 profiles can be specified. :type profiles: list[~azure.mgmt.monitor.models.AutoscaleProfile] :param notifications: the collection of notifications. :type notifications: @@ -48,11 +50,11 @@ class AutoscaleSettingResourcePatch(Model): 'target_resource_uri': {'key': 'properties.targetResourceUri', 'type': 'str'}, } - def __init__(self, profiles, tags=None, notifications=None, enabled=True, name=None, target_resource_uri=None): - super(AutoscaleSettingResourcePatch, self).__init__() - self.tags = tags - self.profiles = profiles - self.notifications = notifications - self.enabled = enabled - self.name = name - self.target_resource_uri = target_resource_uri + def __init__(self, **kwargs): + super(AutoscaleSettingResourcePatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.profiles = kwargs.get('profiles', None) + self.notifications = kwargs.get('notifications', None) + self.enabled = kwargs.get('enabled', True) + self.name = kwargs.get('name', None) + self.target_resource_uri = kwargs.get('target_resource_uri', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch_py3.py new file mode 100644 index 000000000000..be2567532ab0 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutoscaleSettingResourcePatch(Model): + """The autoscale setting object for patch operations. + + All required parameters must be populated in order to send to Azure. + + :param tags: Resource tags + :type tags: dict[str, str] + :param profiles: Required. the collection of automatic scaling profiles + that specify different scaling parameters for different time periods. A + maximum of 20 profiles can be specified. + :type profiles: list[~azure.mgmt.monitor.models.AutoscaleProfile] + :param notifications: the collection of notifications. + :type notifications: + list[~azure.mgmt.monitor.models.AutoscaleNotification] + :param enabled: the enabled flag. Specifies whether automatic scaling is + enabled for the resource. The default value is 'true'. Default value: True + . + :type enabled: bool + :param name: the name of the autoscale setting. + :type name: str + :param target_resource_uri: the resource identifier of the resource that + the autoscale setting should be added to. + :type target_resource_uri: str + """ + + _validation = { + 'profiles': {'required': True, 'max_items': 20}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'profiles': {'key': 'properties.profiles', 'type': '[AutoscaleProfile]'}, + 'notifications': {'key': 'properties.notifications', 'type': '[AutoscaleNotification]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'target_resource_uri': {'key': 'properties.targetResourceUri', 'type': 'str'}, + } + + def __init__(self, *, profiles, tags=None, notifications=None, enabled: bool=True, name: str=None, target_resource_uri: str=None, **kwargs) -> None: + super(AutoscaleSettingResourcePatch, self).__init__(**kwargs) + self.tags = tags + self.profiles = profiles + self.notifications = notifications + self.enabled = enabled + self.name = name + self.target_resource_uri = target_resource_uri diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_py3.py new file mode 100644 index 000000000000..b09a23c57c85 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_py3.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class AutoscaleSettingResource(Resource): + """The autoscale setting resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param profiles: Required. the collection of automatic scaling profiles + that specify different scaling parameters for different time periods. A + maximum of 20 profiles can be specified. + :type profiles: list[~azure.mgmt.monitor.models.AutoscaleProfile] + :param notifications: the collection of notifications. + :type notifications: + list[~azure.mgmt.monitor.models.AutoscaleNotification] + :param enabled: the enabled flag. Specifies whether automatic scaling is + enabled for the resource. The default value is 'true'. Default value: True + . + :type enabled: bool + :param autoscale_setting_resource_name: the name of the autoscale setting. + :type autoscale_setting_resource_name: str + :param target_resource_uri: the resource identifier of the resource that + the autoscale setting should be added to. + :type target_resource_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'profiles': {'required': True, 'max_items': 20}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'profiles': {'key': 'properties.profiles', 'type': '[AutoscaleProfile]'}, + 'notifications': {'key': 'properties.notifications', 'type': '[AutoscaleNotification]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'autoscale_setting_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'target_resource_uri': {'key': 'properties.targetResourceUri', 'type': 'str'}, + } + + def __init__(self, *, location: str, profiles, tags=None, notifications=None, enabled: bool=True, autoscale_setting_resource_name: str=None, target_resource_uri: str=None, **kwargs) -> None: + super(AutoscaleSettingResource, self).__init__(location=location, tags=tags, **kwargs) + self.profiles = profiles + self.notifications = notifications + self.enabled = enabled + self.autoscale_setting_resource_name = autoscale_setting_resource_name + self.target_resource_uri = target_resource_uri diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver.py index 6aa6de323552..3acb85b22433 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver.py @@ -15,11 +15,13 @@ class AzureAppPushReceiver(Model): """The Azure mobile App push notification receiver. - :param name: The name of the Azure mobile app push receiver. Names must be - unique across all receivers within an action group. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Azure mobile app push receiver. + Names must be unique across all receivers within an action group. :type name: str - :param email_address: The email address registered for the Azure mobile - app. + :param email_address: Required. The email address registered for the Azure + mobile app. :type email_address: str """ @@ -33,7 +35,7 @@ class AzureAppPushReceiver(Model): 'email_address': {'key': 'emailAddress', 'type': 'str'}, } - def __init__(self, name, email_address): - super(AzureAppPushReceiver, self).__init__() - self.name = name - self.email_address = email_address + def __init__(self, **kwargs): + super(AzureAppPushReceiver, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.email_address = kwargs.get('email_address', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver_py3.py new file mode 100644 index 000000000000..eee03feaa788 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureAppPushReceiver(Model): + """The Azure mobile App push notification receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Azure mobile app push receiver. + Names must be unique across all receivers within an action group. + :type name: str + :param email_address: Required. The email address registered for the Azure + mobile app. + :type email_address: str + """ + + _validation = { + 'name': {'required': True}, + 'email_address': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + } + + def __init__(self, *, name: str, email_address: str, **kwargs) -> None: + super(AzureAppPushReceiver, self).__init__(**kwargs) + self.name = name + self.email_address = email_address diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline.py index c4c788fedcad..ae375dd23587 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline.py @@ -15,12 +15,14 @@ class Baseline(Model): """The baseline values for a single sensitivity value. - :param sensitivity: the sensitivity of the baseline. Possible values - include: 'Low', 'Medium', 'High' + All required parameters must be populated in order to send to Azure. + + :param sensitivity: Required. the sensitivity of the baseline. Possible + values include: 'Low', 'Medium', 'High' :type sensitivity: str or ~azure.mgmt.monitor.models.Sensitivity - :param low_thresholds: The low thresholds of the baseline. + :param low_thresholds: Required. The low thresholds of the baseline. :type low_thresholds: list[float] - :param high_thresholds: The high thresholds of the baseline. + :param high_thresholds: Required. The high thresholds of the baseline. :type high_thresholds: list[float] """ @@ -36,8 +38,8 @@ class Baseline(Model): 'high_thresholds': {'key': 'highThresholds', 'type': '[float]'}, } - def __init__(self, sensitivity, low_thresholds, high_thresholds): - super(Baseline, self).__init__() - self.sensitivity = sensitivity - self.low_thresholds = low_thresholds - self.high_thresholds = high_thresholds + def __init__(self, **kwargs): + super(Baseline, self).__init__(**kwargs) + self.sensitivity = kwargs.get('sensitivity', None) + self.low_thresholds = kwargs.get('low_thresholds', None) + self.high_thresholds = kwargs.get('high_thresholds', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value.py index d1e576f99407..33364a07cf4f 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value.py @@ -26,7 +26,7 @@ class BaselineMetadataValue(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name=None, value=None): - super(BaselineMetadataValue, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(BaselineMetadataValue, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value_py3.py new file mode 100644 index 000000000000..9ac4552031d0 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BaselineMetadataValue(Model): + """Represents a baseline metadata value. + + :param name: the name of the metadata. + :type name: ~azure.mgmt.monitor.models.LocalizableString + :param value: the value of the metadata. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name=None, value: str=None, **kwargs) -> None: + super(BaselineMetadataValue, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_py3.py new file mode 100644 index 000000000000..6fbaab8dc7e6 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Baseline(Model): + """The baseline values for a single sensitivity value. + + All required parameters must be populated in order to send to Azure. + + :param sensitivity: Required. the sensitivity of the baseline. Possible + values include: 'Low', 'Medium', 'High' + :type sensitivity: str or ~azure.mgmt.monitor.models.Sensitivity + :param low_thresholds: Required. The low thresholds of the baseline. + :type low_thresholds: list[float] + :param high_thresholds: Required. The high thresholds of the baseline. + :type high_thresholds: list[float] + """ + + _validation = { + 'sensitivity': {'required': True}, + 'low_thresholds': {'required': True}, + 'high_thresholds': {'required': True}, + } + + _attribute_map = { + 'sensitivity': {'key': 'sensitivity', 'type': 'Sensitivity'}, + 'low_thresholds': {'key': 'lowThresholds', 'type': '[float]'}, + 'high_thresholds': {'key': 'highThresholds', 'type': '[float]'}, + } + + def __init__(self, *, sensitivity, low_thresholds, high_thresholds, **kwargs) -> None: + super(Baseline, self).__init__(**kwargs) + self.sensitivity = sensitivity + self.low_thresholds = low_thresholds + self.high_thresholds = high_thresholds diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response.py index 2eb7f3d7e1ba..4f5e33789a34 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response.py @@ -63,14 +63,14 @@ class BaselineResponse(Model): 'metadata': {'key': 'properties.metadata', 'type': '[BaselineMetadataValue]'}, } - def __init__(self, timespan=None, interval=None, aggregation=None, timestamps=None, baseline=None, metadata=None): - super(BaselineResponse, self).__init__() + def __init__(self, **kwargs): + super(BaselineResponse, self).__init__(**kwargs) self.id = None self.type = None self.name = None - self.timespan = timespan - self.interval = interval - self.aggregation = aggregation - self.timestamps = timestamps - self.baseline = baseline - self.metadata = metadata + self.timespan = kwargs.get('timespan', None) + self.interval = kwargs.get('interval', None) + self.aggregation = kwargs.get('aggregation', None) + self.timestamps = kwargs.get('timestamps', None) + self.baseline = kwargs.get('baseline', None) + self.metadata = kwargs.get('metadata', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response_py3.py new file mode 100644 index 000000000000..34e00bbdb19a --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response_py3.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BaselineResponse(Model): + """The response to a baseline query. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: the metric baseline Id. + :vartype id: str + :ivar type: the resource type of the baseline resource. + :vartype type: str + :ivar name: the name and the display name of the metric, i.e. it is + localizable string. + :vartype name: ~azure.mgmt.monitor.models.LocalizableString + :param timespan: The timespan for which the data was retrieved. Its value + consists of two datatimes concatenated, separated by '/'. This may be + adjusted in the future and returned back from what was originally + requested. + :type timespan: str + :param interval: The interval (window size) for which the metric data was + returned in. This may be adjusted in the future and returned back from + what was originally requested. This is not present if a metadata request + was made. + :type interval: timedelta + :param aggregation: The aggregation type of the metric. + :type aggregation: str + :param timestamps: the array of timestamps of the baselines. + :type timestamps: list[datetime] + :param baseline: the baseline values for each sensitivity. + :type baseline: list[~azure.mgmt.monitor.models.Baseline] + :param metadata: the baseline metadata values. + :type metadata: list[~azure.mgmt.monitor.models.BaselineMetadataValue] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'timespan': {'key': 'properties.timespan', 'type': 'str'}, + 'interval': {'key': 'properties.interval', 'type': 'duration'}, + 'aggregation': {'key': 'properties.aggregation', 'type': 'str'}, + 'timestamps': {'key': 'properties.timestamps', 'type': '[iso-8601]'}, + 'baseline': {'key': 'properties.baseline', 'type': '[Baseline]'}, + 'metadata': {'key': 'properties.metadata', 'type': '[BaselineMetadataValue]'}, + } + + def __init__(self, *, timespan: str=None, interval=None, aggregation: str=None, timestamps=None, baseline=None, metadata=None, **kwargs) -> None: + super(BaselineResponse, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.timespan = timespan + self.interval = interval + self.aggregation = aggregation + self.timestamps = timestamps + self.baseline = baseline + self.metadata = metadata diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response.py index f5faef335596..b2a275759db5 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response.py @@ -15,11 +15,13 @@ class CalculateBaselineResponse(Model): """The response to a calcualte baseline call. - :param type: the resource type of the baseline resource. + All required parameters must be populated in order to send to Azure. + + :param type: Required. the resource type of the baseline resource. :type type: str :param timestamps: the array of timestamps of the baselines. :type timestamps: list[datetime] - :param baseline: the baseline values for each sensitivity. + :param baseline: Required. the baseline values for each sensitivity. :type baseline: list[~azure.mgmt.monitor.models.Baseline] """ @@ -34,8 +36,8 @@ class CalculateBaselineResponse(Model): 'baseline': {'key': 'baseline', 'type': '[Baseline]'}, } - def __init__(self, type, baseline, timestamps=None): - super(CalculateBaselineResponse, self).__init__() - self.type = type - self.timestamps = timestamps - self.baseline = baseline + def __init__(self, **kwargs): + super(CalculateBaselineResponse, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.timestamps = kwargs.get('timestamps', None) + self.baseline = kwargs.get('baseline', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response_py3.py new file mode 100644 index 000000000000..5a39b8a64d95 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CalculateBaselineResponse(Model): + """The response to a calcualte baseline call. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. the resource type of the baseline resource. + :type type: str + :param timestamps: the array of timestamps of the baselines. + :type timestamps: list[datetime] + :param baseline: Required. the baseline values for each sensitivity. + :type baseline: list[~azure.mgmt.monitor.models.Baseline] + """ + + _validation = { + 'type': {'required': True}, + 'baseline': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, + 'baseline': {'key': 'baseline', 'type': '[Baseline]'}, + } + + def __init__(self, *, type: str, baseline, timestamps=None, **kwargs) -> None: + super(CalculateBaselineResponse, self).__init__(**kwargs) + self.type = type + self.timestamps = timestamps + self.baseline = baseline diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource.py index 4103b2e9bcbd..22a2951b0b3f 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource.py @@ -42,6 +42,6 @@ class DiagnosticSettingsCategoryResource(ProxyOnlyResource): 'category_type': {'key': 'properties.categoryType', 'type': 'CategoryType'}, } - def __init__(self, category_type=None): - super(DiagnosticSettingsCategoryResource, self).__init__() - self.category_type = category_type + def __init__(self, **kwargs): + super(DiagnosticSettingsCategoryResource, self).__init__(**kwargs) + self.category_type = kwargs.get('category_type', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection.py index a3a42e0f1085..1192f620b392 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection.py @@ -24,6 +24,6 @@ class DiagnosticSettingsCategoryResourceCollection(Model): 'value': {'key': 'value', 'type': '[DiagnosticSettingsCategoryResource]'}, } - def __init__(self, value=None): - super(DiagnosticSettingsCategoryResourceCollection, self).__init__() - self.value = value + def __init__(self, **kwargs): + super(DiagnosticSettingsCategoryResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection_py3.py new file mode 100644 index 000000000000..7e7e044da6c8 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DiagnosticSettingsCategoryResourceCollection(Model): + """Represents a collection of diagnostic setting category resources. + + :param value: The collection of diagnostic settings category resources. + :type value: + list[~azure.mgmt.monitor.models.DiagnosticSettingsCategoryResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiagnosticSettingsCategoryResource]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(DiagnosticSettingsCategoryResourceCollection, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_py3.py new file mode 100644 index 000000000000..4a9a95c9f8ea --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_only_resource import ProxyOnlyResource + + +class DiagnosticSettingsCategoryResource(ProxyOnlyResource): + """The diagnostic settings category resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param category_type: The type of the diagnostic settings category. + Possible values include: 'Metrics', 'Logs' + :type category_type: str or ~azure.mgmt.monitor.models.CategoryType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'category_type': {'key': 'properties.categoryType', 'type': 'CategoryType'}, + } + + def __init__(self, *, category_type=None, **kwargs) -> None: + super(DiagnosticSettingsCategoryResource, self).__init__(, **kwargs) + self.category_type = category_type diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource.py index a022ef0d9bad..09cbca388e28 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource.py @@ -62,11 +62,11 @@ class DiagnosticSettingsResource(ProxyOnlyResource): 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, } - def __init__(self, storage_account_id=None, event_hub_authorization_rule_id=None, event_hub_name=None, metrics=None, logs=None, workspace_id=None): - super(DiagnosticSettingsResource, self).__init__() - self.storage_account_id = storage_account_id - self.event_hub_authorization_rule_id = event_hub_authorization_rule_id - self.event_hub_name = event_hub_name - self.metrics = metrics - self.logs = logs - self.workspace_id = workspace_id + def __init__(self, **kwargs): + super(DiagnosticSettingsResource, self).__init__(**kwargs) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.event_hub_authorization_rule_id = kwargs.get('event_hub_authorization_rule_id', None) + self.event_hub_name = kwargs.get('event_hub_name', None) + self.metrics = kwargs.get('metrics', None) + self.logs = kwargs.get('logs', None) + self.workspace_id = kwargs.get('workspace_id', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection.py index 3aee18a1edf6..396b3e7b7afb 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection.py @@ -23,6 +23,6 @@ class DiagnosticSettingsResourceCollection(Model): 'value': {'key': 'value', 'type': '[DiagnosticSettingsResource]'}, } - def __init__(self, value=None): - super(DiagnosticSettingsResourceCollection, self).__init__() - self.value = value + def __init__(self, **kwargs): + super(DiagnosticSettingsResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection_py3.py new file mode 100644 index 000000000000..8e1ec8c0813b --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DiagnosticSettingsResourceCollection(Model): + """Represents a collection of alert rule resources. + + :param value: The collection of diagnostic settings resources;. + :type value: list[~azure.mgmt.monitor.models.DiagnosticSettingsResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiagnosticSettingsResource]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(DiagnosticSettingsResourceCollection, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_py3.py new file mode 100644 index 000000000000..7d0526053d72 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_py3.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_only_resource import ProxyOnlyResource + + +class DiagnosticSettingsResource(ProxyOnlyResource): + """The diagnostic setting resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param storage_account_id: The resource ID of the storage account to which + you would like to send Diagnostic Logs. + :type storage_account_id: str + :param event_hub_authorization_rule_id: The resource Id for the event hub + authorization rule. + :type event_hub_authorization_rule_id: str + :param event_hub_name: The name of the event hub. If none is specified, + the default event hub will be selected. + :type event_hub_name: str + :param metrics: the list of metric settings. + :type metrics: list[~azure.mgmt.monitor.models.MetricSettings] + :param logs: the list of logs settings. + :type logs: list[~azure.mgmt.monitor.models.LogSettings] + :param workspace_id: The workspace ID (resource ID of a Log Analytics + workspace) for a Log Analytics workspace to which you would like to send + Diagnostic Logs. Example: + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2 + :type workspace_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + 'event_hub_authorization_rule_id': {'key': 'properties.eventHubAuthorizationRuleId', 'type': 'str'}, + 'event_hub_name': {'key': 'properties.eventHubName', 'type': 'str'}, + 'metrics': {'key': 'properties.metrics', 'type': '[MetricSettings]'}, + 'logs': {'key': 'properties.logs', 'type': '[LogSettings]'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + } + + def __init__(self, *, storage_account_id: str=None, event_hub_authorization_rule_id: str=None, event_hub_name: str=None, metrics=None, logs=None, workspace_id: str=None, **kwargs) -> None: + super(DiagnosticSettingsResource, self).__init__(, **kwargs) + self.storage_account_id = storage_account_id + self.event_hub_authorization_rule_id = event_hub_authorization_rule_id + self.event_hub_name = event_hub_name + self.metrics = metrics + self.logs = logs + self.workspace_id = workspace_id diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification.py index ef6f1c0b0656..558502e35955 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification.py @@ -32,8 +32,8 @@ class EmailNotification(Model): 'custom_emails': {'key': 'customEmails', 'type': '[str]'}, } - def __init__(self, send_to_subscription_administrator=None, send_to_subscription_co_administrators=None, custom_emails=None): - super(EmailNotification, self).__init__() - self.send_to_subscription_administrator = send_to_subscription_administrator - self.send_to_subscription_co_administrators = send_to_subscription_co_administrators - self.custom_emails = custom_emails + def __init__(self, **kwargs): + super(EmailNotification, self).__init__(**kwargs) + self.send_to_subscription_administrator = kwargs.get('send_to_subscription_administrator', None) + self.send_to_subscription_co_administrators = kwargs.get('send_to_subscription_co_administrators', None) + self.custom_emails = kwargs.get('custom_emails', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification_py3.py new file mode 100644 index 000000000000..aef62c2218b5 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EmailNotification(Model): + """Email notification of an autoscale event. + + :param send_to_subscription_administrator: a value indicating whether to + send email to subscription administrator. + :type send_to_subscription_administrator: bool + :param send_to_subscription_co_administrators: a value indicating whether + to send email to subscription co-administrators. + :type send_to_subscription_co_administrators: bool + :param custom_emails: the custom e-mails list. This value can be null or + empty, in which case this attribute will be ignored. + :type custom_emails: list[str] + """ + + _attribute_map = { + 'send_to_subscription_administrator': {'key': 'sendToSubscriptionAdministrator', 'type': 'bool'}, + 'send_to_subscription_co_administrators': {'key': 'sendToSubscriptionCoAdministrators', 'type': 'bool'}, + 'custom_emails': {'key': 'customEmails', 'type': '[str]'}, + } + + def __init__(self, *, send_to_subscription_administrator: bool=None, send_to_subscription_co_administrators: bool=None, custom_emails=None, **kwargs) -> None: + super(EmailNotification, self).__init__(**kwargs) + self.send_to_subscription_administrator = send_to_subscription_administrator + self.send_to_subscription_co_administrators = send_to_subscription_co_administrators + self.custom_emails = custom_emails diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver.py index 1b1b11c78495..4877d8aea802 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver.py @@ -18,10 +18,12 @@ class EmailReceiver(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The name of the email receiver. Names must be unique across - all receivers within an action group. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the email receiver. Names must be + unique across all receivers within an action group. :type name: str - :param email_address: The email address of this receiver. + :param email_address: Required. The email address of this receiver. :type email_address: str :ivar status: The receiver status of the e-mail. Possible values include: 'NotSpecified', 'Enabled', 'Disabled' @@ -40,8 +42,8 @@ class EmailReceiver(Model): 'status': {'key': 'status', 'type': 'ReceiverStatus'}, } - def __init__(self, name, email_address): - super(EmailReceiver, self).__init__() - self.name = name - self.email_address = email_address + def __init__(self, **kwargs): + super(EmailReceiver, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.email_address = kwargs.get('email_address', None) self.status = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver_py3.py new file mode 100644 index 000000000000..1f9c3f03f4a9 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EmailReceiver(Model): + """An email receiver. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the email receiver. Names must be + unique across all receivers within an action group. + :type name: str + :param email_address: Required. The email address of this receiver. + :type email_address: str + :ivar status: The receiver status of the e-mail. Possible values include: + 'NotSpecified', 'Enabled', 'Disabled' + :vartype status: str or ~azure.mgmt.monitor.models.ReceiverStatus + """ + + _validation = { + 'name': {'required': True}, + 'email_address': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ReceiverStatus'}, + } + + def __init__(self, *, name: str, email_address: str, **kwargs) -> None: + super(EmailReceiver, self).__init__(**kwargs) + self.name = name + self.email_address = email_address + self.status = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request.py index 5f481ee3f3d4..655222716b8c 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request.py @@ -15,7 +15,9 @@ class EnableRequest(Model): """Describes a receiver that should be resubscribed. - :param receiver_name: The name of the receiver to resubscribe. + All required parameters must be populated in order to send to Azure. + + :param receiver_name: Required. The name of the receiver to resubscribe. :type receiver_name: str """ @@ -27,6 +29,6 @@ class EnableRequest(Model): 'receiver_name': {'key': 'receiverName', 'type': 'str'}, } - def __init__(self, receiver_name): - super(EnableRequest, self).__init__() - self.receiver_name = receiver_name + def __init__(self, **kwargs): + super(EnableRequest, self).__init__(**kwargs) + self.receiver_name = kwargs.get('receiver_name', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request_py3.py new file mode 100644 index 000000000000..cd2037beb359 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EnableRequest(Model): + """Describes a receiver that should be resubscribed. + + All required parameters must be populated in order to send to Azure. + + :param receiver_name: Required. The name of the receiver to resubscribe. + :type receiver_name: str + """ + + _validation = { + 'receiver_name': {'required': True}, + } + + _attribute_map = { + 'receiver_name': {'key': 'receiverName', 'type': 'str'}, + } + + def __init__(self, *, receiver_name: str, **kwargs) -> None: + super(EnableRequest, self).__init__(**kwargs) + self.receiver_name = receiver_name diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response.py index 1a399569811b..b3d490a49503 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response.py @@ -27,10 +27,10 @@ class ErrorResponse(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, code=None, message=None): - super(ErrorResponse, self).__init__() - self.code = code - self.message = message + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) class ErrorResponseException(HttpOperationError): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response_py3.py new file mode 100644 index 000000000000..5504940d6873 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Describes the format of Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py index 990e7e16a3d8..392b04f3e4a6 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py @@ -153,8 +153,8 @@ class EventData(Model): 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } - def __init__(self): - super(EventData, self).__init__() + def __init__(self, **kwargs): + super(EventData, self).__init__(**kwargs) self.authorization = None self.claims = None self.caller = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data_py3.py new file mode 100644 index 000000000000..79ca08143d5c --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data_py3.py @@ -0,0 +1,181 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EventData(Model): + """The Azure event log entries are of type EventData. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar authorization: + :vartype authorization: ~azure.mgmt.monitor.models.SenderAuthorization + :ivar claims: key value pairs to identify ARM permissions. + :vartype claims: dict[str, str] + :ivar caller: the email address of the user who has performed the + operation, the UPN claim or SPN claim based on availability. + :vartype caller: str + :ivar description: the description of the event. + :vartype description: str + :ivar id: the Id of this event as required by ARM for RBAC. It contains + the EventDataID and a timestamp information. + :vartype id: str + :ivar event_data_id: the event data Id. This is a unique identifier for an + event. + :vartype event_data_id: str + :ivar correlation_id: the correlation Id, usually a GUID in the string + format. The correlation Id is shared among the events that belong to the + same uber operation. + :vartype correlation_id: str + :ivar event_name: the event name. This value should not be confused with + OperationName. For practical purposes, OperationName might be more + appealing to end users. + :vartype event_name: ~azure.mgmt.monitor.models.LocalizableString + :ivar category: the event category. + :vartype category: ~azure.mgmt.monitor.models.LocalizableString + :ivar http_request: the HTTP request info. Usually includes the + 'clientRequestId', 'clientIpAddress' (IP address of the user who initiated + the event) and 'method' (HTTP method e.g. PUT). + :vartype http_request: ~azure.mgmt.monitor.models.HttpRequestInfo + :ivar level: the event level. Possible values include: 'Critical', + 'Error', 'Warning', 'Informational', 'Verbose' + :vartype level: str or ~azure.mgmt.monitor.models.EventLevel + :ivar resource_group_name: the resource group name of the impacted + resource. + :vartype resource_group_name: str + :ivar resource_provider_name: the resource provider name of the impacted + resource. + :vartype resource_provider_name: + ~azure.mgmt.monitor.models.LocalizableString + :ivar resource_id: the resource uri that uniquely identifies the resource + that caused this event. + :vartype resource_id: str + :ivar resource_type: the resource type + :vartype resource_type: ~azure.mgmt.monitor.models.LocalizableString + :ivar operation_id: It is usually a GUID shared among the events + corresponding to single operation. This value should not be confused with + EventName. + :vartype operation_id: str + :ivar operation_name: the operation name. + :vartype operation_name: ~azure.mgmt.monitor.models.LocalizableString + :ivar properties: the set of pairs (usually a + Dictionary) that includes details about the event. + :vartype properties: dict[str, str] + :ivar status: a string describing the status of the operation. Some + typical values are: Started, In progress, Succeeded, Failed, Resolved. + :vartype status: ~azure.mgmt.monitor.models.LocalizableString + :ivar sub_status: the event sub status. Most of the time, when included, + this captures the HTTP status code of the REST call. Common values are: OK + (HTTP Status Code: 200), Created (HTTP Status Code: 201), Accepted (HTTP + Status Code: 202), No Content (HTTP Status Code: 204), Bad Request(HTTP + Status Code: 400), Not Found (HTTP Status Code: 404), Conflict (HTTP + Status Code: 409), Internal Server Error (HTTP Status Code: 500), Service + Unavailable (HTTP Status Code:503), Gateway Timeout (HTTP Status Code: + 504) + :vartype sub_status: ~azure.mgmt.monitor.models.LocalizableString + :ivar event_timestamp: the timestamp of when the event was generated by + the Azure service processing the request corresponding the event. It in + ISO 8601 format. + :vartype event_timestamp: datetime + :ivar submission_timestamp: the timestamp of when the event became + available for querying via this API. It is in ISO 8601 format. This value + should not be confused eventTimestamp. As there might be a delay between + the occurrence time of the event, and the time that the event is submitted + to the Azure logging infrastructure. + :vartype submission_timestamp: datetime + :ivar subscription_id: the Azure subscription Id usually a GUID. + :vartype subscription_id: str + :ivar tenant_id: the Azure tenant Id + :vartype tenant_id: str + """ + + _validation = { + 'authorization': {'readonly': True}, + 'claims': {'readonly': True}, + 'caller': {'readonly': True}, + 'description': {'readonly': True}, + 'id': {'readonly': True}, + 'event_data_id': {'readonly': True}, + 'correlation_id': {'readonly': True}, + 'event_name': {'readonly': True}, + 'category': {'readonly': True}, + 'http_request': {'readonly': True}, + 'level': {'readonly': True}, + 'resource_group_name': {'readonly': True}, + 'resource_provider_name': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'operation_name': {'readonly': True}, + 'properties': {'readonly': True}, + 'status': {'readonly': True}, + 'sub_status': {'readonly': True}, + 'event_timestamp': {'readonly': True}, + 'submission_timestamp': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'authorization': {'key': 'authorization', 'type': 'SenderAuthorization'}, + 'claims': {'key': 'claims', 'type': '{str}'}, + 'caller': {'key': 'caller', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'event_data_id': {'key': 'eventDataId', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'event_name': {'key': 'eventName', 'type': 'LocalizableString'}, + 'category': {'key': 'category', 'type': 'LocalizableString'}, + 'http_request': {'key': 'httpRequest', 'type': 'HttpRequestInfo'}, + 'level': {'key': 'level', 'type': 'EventLevel'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'resource_provider_name': {'key': 'resourceProviderName', 'type': 'LocalizableString'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'LocalizableString'}, + 'operation_id': {'key': 'operationId', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'LocalizableString'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'status': {'key': 'status', 'type': 'LocalizableString'}, + 'sub_status': {'key': 'subStatus', 'type': 'LocalizableString'}, + 'event_timestamp': {'key': 'eventTimestamp', 'type': 'iso-8601'}, + 'submission_timestamp': {'key': 'submissionTimestamp', 'type': 'iso-8601'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(EventData, self).__init__(**kwargs) + self.authorization = None + self.claims = None + self.caller = None + self.description = None + self.id = None + self.event_data_id = None + self.correlation_id = None + self.event_name = None + self.category = None + self.http_request = None + self.level = None + self.resource_group_name = None + self.resource_provider_name = None + self.resource_id = None + self.resource_type = None + self.operation_id = None + self.operation_name = None + self.properties = None + self.status = None + self.sub_status = None + self.event_timestamp = None + self.submission_timestamp = None + self.subscription_id = None + self.tenant_id = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info.py index d25e92a5190f..45e910390503 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info.py @@ -32,9 +32,9 @@ class HttpRequestInfo(Model): 'uri': {'key': 'uri', 'type': 'str'}, } - def __init__(self, client_request_id=None, client_ip_address=None, method=None, uri=None): - super(HttpRequestInfo, self).__init__() - self.client_request_id = client_request_id - self.client_ip_address = client_ip_address - self.method = method - self.uri = uri + def __init__(self, **kwargs): + super(HttpRequestInfo, self).__init__(**kwargs) + self.client_request_id = kwargs.get('client_request_id', None) + self.client_ip_address = kwargs.get('client_ip_address', None) + self.method = kwargs.get('method', None) + self.uri = kwargs.get('uri', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info_py3.py new file mode 100644 index 000000000000..5e0e15d35a83 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpRequestInfo(Model): + """The Http request info. + + :param client_request_id: the client request id. + :type client_request_id: str + :param client_ip_address: the client Ip Address + :type client_ip_address: str + :param method: the Http request method. + :type method: str + :param uri: the Uri. + :type uri: str + """ + + _attribute_map = { + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'client_ip_address': {'key': 'clientIpAddress', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, *, client_request_id: str=None, client_ip_address: str=None, method: str=None, uri: str=None, **kwargs) -> None: + super(HttpRequestInfo, self).__init__(**kwargs) + self.client_request_id = client_request_id + self.client_ip_address = client_ip_address + self.method = method + self.uri = uri diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/incident.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/incident.py index be7eb38e45f0..806624781a55 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/incident.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/incident.py @@ -49,8 +49,8 @@ class Incident(Model): 'resolved_time': {'key': 'resolvedTime', 'type': 'iso-8601'}, } - def __init__(self): - super(Incident, self).__init__() + def __init__(self, **kwargs): + super(Incident, self).__init__(**kwargs) self.name = None self.rule_name = None self.is_active = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/incident_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/incident_py3.py new file mode 100644 index 000000000000..ea8b18ee8554 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/incident_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Incident(Model): + """An alert incident indicates the activation status of an alert rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Incident name. + :vartype name: str + :ivar rule_name: Rule name that is associated with the incident. + :vartype rule_name: str + :ivar is_active: A boolean to indicate whether the incident is active or + resolved. + :vartype is_active: bool + :ivar activated_time: The time at which the incident was activated in + ISO8601 format. + :vartype activated_time: datetime + :ivar resolved_time: The time at which the incident was resolved in + ISO8601 format. If null, it means the incident is still active. + :vartype resolved_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'rule_name': {'readonly': True}, + 'is_active': {'readonly': True}, + 'activated_time': {'readonly': True}, + 'resolved_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'rule_name': {'key': 'ruleName', 'type': 'str'}, + 'is_active': {'key': 'isActive', 'type': 'bool'}, + 'activated_time': {'key': 'activatedTime', 'type': 'iso-8601'}, + 'resolved_time': {'key': 'resolvedTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(Incident, self).__init__(**kwargs) + self.name = None + self.rule_name = None + self.is_active = None + self.activated_time = None + self.resolved_time = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver.py index 3d58ce856e98..054037009c07 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver.py @@ -15,18 +15,21 @@ class ItsmReceiver(Model): """An Itsm receiver. - :param name: The name of the Itsm receiver. Names must be unique across - all receivers within an action group. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Itsm receiver. Names must be unique + across all receivers within an action group. :type name: str - :param workspace_id: OMS LA instance identifier. + :param workspace_id: Required. OMS LA instance identifier. :type workspace_id: str - :param connection_id: Unique identification of ITSM connection among - multiple defined in above workspace. + :param connection_id: Required. Unique identification of ITSM connection + among multiple defined in above workspace. :type connection_id: str - :param ticket_configuration: JSON blob for the configurations of the ITSM - action. CreateMultipleWorkItems option will be part of this blob as well. + :param ticket_configuration: Required. JSON blob for the configurations of + the ITSM action. CreateMultipleWorkItems option will be part of this blob + as well. :type ticket_configuration: str - :param region: Region in which workspace resides. Supported + :param region: Required. Region in which workspace resides. Supported values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope' :type region: str """ @@ -47,10 +50,10 @@ class ItsmReceiver(Model): 'region': {'key': 'region', 'type': 'str'}, } - def __init__(self, name, workspace_id, connection_id, ticket_configuration, region): - super(ItsmReceiver, self).__init__() - self.name = name - self.workspace_id = workspace_id - self.connection_id = connection_id - self.ticket_configuration = ticket_configuration - self.region = region + def __init__(self, **kwargs): + super(ItsmReceiver, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.workspace_id = kwargs.get('workspace_id', None) + self.connection_id = kwargs.get('connection_id', None) + self.ticket_configuration = kwargs.get('ticket_configuration', None) + self.region = kwargs.get('region', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver_py3.py new file mode 100644 index 000000000000..581cb90911b5 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ItsmReceiver(Model): + """An Itsm receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Itsm receiver. Names must be unique + across all receivers within an action group. + :type name: str + :param workspace_id: Required. OMS LA instance identifier. + :type workspace_id: str + :param connection_id: Required. Unique identification of ITSM connection + among multiple defined in above workspace. + :type connection_id: str + :param ticket_configuration: Required. JSON blob for the configurations of + the ITSM action. CreateMultipleWorkItems option will be part of this blob + as well. + :type ticket_configuration: str + :param region: Required. Region in which workspace resides. Supported + values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope' + :type region: str + """ + + _validation = { + 'name': {'required': True}, + 'workspace_id': {'required': True}, + 'connection_id': {'required': True}, + 'ticket_configuration': {'required': True}, + 'region': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'connection_id': {'key': 'connectionId', 'type': 'str'}, + 'ticket_configuration': {'key': 'ticketConfiguration', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + } + + def __init__(self, *, name: str, workspace_id: str, connection_id: str, ticket_configuration: str, region: str, **kwargs) -> None: + super(ItsmReceiver, self).__init__(**kwargs) + self.name = name + self.workspace_id = workspace_id + self.connection_id = connection_id + self.ticket_configuration = ticket_configuration + self.region = region diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string.py index 3e058e870290..05db04fb721f 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string.py @@ -15,7 +15,9 @@ class LocalizableString(Model): """The localizable string class. - :param value: the invariant value. + All required parameters must be populated in order to send to Azure. + + :param value: Required. the invariant value. :type value: str :param localized_value: the locale specific value. :type localized_value: str @@ -30,7 +32,7 @@ class LocalizableString(Model): 'localized_value': {'key': 'localizedValue', 'type': 'str'}, } - def __init__(self, value, localized_value=None): - super(LocalizableString, self).__init__() - self.value = value - self.localized_value = localized_value + def __init__(self, **kwargs): + super(LocalizableString, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string_py3.py new file mode 100644 index 000000000000..8bae3303a19f --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LocalizableString(Model): + """The localizable string class. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. the invariant value. + :type value: str + :param localized_value: the locale specific value. + :type localized_value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str, localized_value: str=None, **kwargs) -> None: + super(LocalizableString, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition.py index 5c67c3027dd2..50a9b346dbd6 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition.py @@ -15,17 +15,19 @@ class LocationThresholdRuleCondition(RuleCondition): """A rule condition based on a certain number of locations failing. + All required parameters must be populated in order to send to Azure. + :param data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. :type data_source: ~azure.mgmt.monitor.models.RuleDataSource - :param odatatype: Constant filled by server. + :param odatatype: Required. Constant filled by server. :type odatatype: str :param window_size: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day. :type window_size: timedelta - :param failed_location_count: the number of locations that must fail to - activate the alert. + :param failed_location_count: Required. the number of locations that must + fail to activate the alert. :type failed_location_count: int """ @@ -41,8 +43,8 @@ class LocationThresholdRuleCondition(RuleCondition): 'failed_location_count': {'key': 'failedLocationCount', 'type': 'int'}, } - def __init__(self, failed_location_count, data_source=None, window_size=None): - super(LocationThresholdRuleCondition, self).__init__(data_source=data_source) - self.window_size = window_size - self.failed_location_count = failed_location_count + def __init__(self, **kwargs): + super(LocationThresholdRuleCondition, self).__init__(**kwargs) + self.window_size = kwargs.get('window_size', None) + self.failed_location_count = kwargs.get('failed_location_count', None) self.odatatype = 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition_py3.py new file mode 100644 index 000000000000..1d4157b8cdd1 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .rule_condition import RuleCondition + + +class LocationThresholdRuleCondition(RuleCondition): + """A rule condition based on a certain number of locations failing. + + All required parameters must be populated in order to send to Azure. + + :param data_source: the resource from which the rule collects its data. + For this type dataSource will always be of type RuleMetricDataSource. + :type data_source: ~azure.mgmt.monitor.models.RuleDataSource + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param window_size: the period of time (in ISO 8601 duration format) that + is used to monitor alert activity based on the threshold. If specified + then it must be between 5 minutes and 1 day. + :type window_size: timedelta + :param failed_location_count: Required. the number of locations that must + fail to activate the alert. + :type failed_location_count: int + """ + + _validation = { + 'odatatype': {'required': True}, + 'failed_location_count': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + 'failed_location_count': {'key': 'failedLocationCount', 'type': 'int'}, + } + + def __init__(self, *, failed_location_count: int, data_source=None, window_size=None, **kwargs) -> None: + super(LocationThresholdRuleCondition, self).__init__(data_source=data_source, **kwargs) + self.window_size = window_size + self.failed_location_count = failed_location_count + self.odatatype = 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource.py index 0ab72410609a..42e068ce12b8 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource.py @@ -18,13 +18,15 @@ class LogProfileResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id :vartype id: str :ivar name: Azure resource name :vartype name: str :ivar type: Azure resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags :type tags: dict[str, str] @@ -36,15 +38,16 @@ class LogProfileResource(Resource): the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'. :type service_bus_rule_id: str - :param locations: 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. + :param locations: Required. 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. :type locations: list[str] - :param categories: the categories of the logs. These categories are - created as is convenient to the user. Some values are: 'Write', 'Delete', - and/or 'Action.' + :param categories: Required. the categories of the logs. These categories + are created as is convenient to the user. Some values are: 'Write', + 'Delete', and/or 'Action.' :type categories: list[str] - :param retention_policy: the retention policy for the events in the log. + :param retention_policy: Required. the retention policy for the events in + the log. :type retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy """ @@ -71,10 +74,10 @@ class LogProfileResource(Resource): 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicy'}, } - def __init__(self, location, locations, categories, retention_policy, tags=None, storage_account_id=None, service_bus_rule_id=None): - super(LogProfileResource, self).__init__(location=location, tags=tags) - self.storage_account_id = storage_account_id - self.service_bus_rule_id = service_bus_rule_id - self.locations = locations - self.categories = categories - self.retention_policy = retention_policy + def __init__(self, **kwargs): + super(LogProfileResource, self).__init__(**kwargs) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.service_bus_rule_id = kwargs.get('service_bus_rule_id', None) + self.locations = kwargs.get('locations', None) + self.categories = kwargs.get('categories', None) + self.retention_policy = kwargs.get('retention_policy', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch.py index d5a5316148d6..c6ae3dc17e4b 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch.py @@ -15,6 +15,8 @@ class LogProfileResourcePatch(Model): """The log profile resource for patch operations. + All required parameters must be populated in order to send to Azure. + :param tags: Resource tags :type tags: dict[str, str] :param storage_account_id: the resource id of the storage account to which @@ -25,15 +27,16 @@ class LogProfileResourcePatch(Model): the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'. :type service_bus_rule_id: str - :param locations: 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. + :param locations: Required. 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. :type locations: list[str] - :param categories: the categories of the logs. These categories are - created as is convenient to the user. Some values are: 'Write', 'Delete', - and/or 'Action.' + :param categories: Required. the categories of the logs. These categories + are created as is convenient to the user. Some values are: 'Write', + 'Delete', and/or 'Action.' :type categories: list[str] - :param retention_policy: the retention policy for the events in the log. + :param retention_policy: Required. the retention policy for the events in + the log. :type retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy """ @@ -52,11 +55,11 @@ class LogProfileResourcePatch(Model): 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicy'}, } - def __init__(self, locations, categories, retention_policy, tags=None, storage_account_id=None, service_bus_rule_id=None): - super(LogProfileResourcePatch, self).__init__() - self.tags = tags - self.storage_account_id = storage_account_id - self.service_bus_rule_id = service_bus_rule_id - self.locations = locations - self.categories = categories - self.retention_policy = retention_policy + def __init__(self, **kwargs): + super(LogProfileResourcePatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.service_bus_rule_id = kwargs.get('service_bus_rule_id', None) + self.locations = kwargs.get('locations', None) + self.categories = kwargs.get('categories', None) + self.retention_policy = kwargs.get('retention_policy', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch_py3.py new file mode 100644 index 000000000000..783dc9fb262c --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LogProfileResourcePatch(Model): + """The log profile resource for patch operations. + + All required parameters must be populated in order to send to Azure. + + :param tags: Resource tags + :type tags: dict[str, str] + :param storage_account_id: the resource id of the storage account to which + you would like to send the Activity Log. + :type storage_account_id: str + :param service_bus_rule_id: 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}'. + :type service_bus_rule_id: str + :param locations: Required. 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. + :type locations: list[str] + :param categories: Required. the categories of the logs. These categories + are created as is convenient to the user. Some values are: 'Write', + 'Delete', and/or 'Action.' + :type categories: list[str] + :param retention_policy: Required. the retention policy for the events in + the log. + :type retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy + """ + + _validation = { + 'locations': {'required': True}, + 'categories': {'required': True}, + 'retention_policy': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + 'service_bus_rule_id': {'key': 'properties.serviceBusRuleId', 'type': 'str'}, + 'locations': {'key': 'properties.locations', 'type': '[str]'}, + 'categories': {'key': 'properties.categories', 'type': '[str]'}, + 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__(self, *, locations, categories, retention_policy, tags=None, storage_account_id: str=None, service_bus_rule_id: str=None, **kwargs) -> None: + super(LogProfileResourcePatch, self).__init__(**kwargs) + self.tags = tags + self.storage_account_id = storage_account_id + self.service_bus_rule_id = service_bus_rule_id + self.locations = locations + self.categories = categories + self.retention_policy = retention_policy diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_py3.py new file mode 100644 index 000000000000..ec376218e6c2 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class LogProfileResource(Resource): + """The log profile resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param storage_account_id: the resource id of the storage account to which + you would like to send the Activity Log. + :type storage_account_id: str + :param service_bus_rule_id: 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}'. + :type service_bus_rule_id: str + :param locations: Required. 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. + :type locations: list[str] + :param categories: Required. the categories of the logs. These categories + are created as is convenient to the user. Some values are: 'Write', + 'Delete', and/or 'Action.' + :type categories: list[str] + :param retention_policy: Required. the retention policy for the events in + the log. + :type retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'categories': {'required': True}, + 'retention_policy': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + 'service_bus_rule_id': {'key': 'properties.serviceBusRuleId', 'type': 'str'}, + 'locations': {'key': 'properties.locations', 'type': '[str]'}, + 'categories': {'key': 'properties.categories', 'type': '[str]'}, + 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__(self, *, location: str, locations, categories, retention_policy, tags=None, storage_account_id: str=None, service_bus_rule_id: str=None, **kwargs) -> None: + super(LogProfileResource, self).__init__(location=location, tags=tags, **kwargs) + self.storage_account_id = storage_account_id + self.service_bus_rule_id = service_bus_rule_id + self.locations = locations + self.categories = categories + self.retention_policy = retention_policy diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings.py index 6e5b89a68254..fa6e2a4103da 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings.py @@ -16,12 +16,14 @@ class LogSettings(Model): """Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log. + All required parameters must be populated in order to send to Azure. + :param category: Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation. :type category: str - :param enabled: a value indicating whether this log is enabled. + :param enabled: Required. a value indicating whether this log is enabled. :type enabled: bool :param retention_policy: the retention policy for this log. :type retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy @@ -37,8 +39,8 @@ class LogSettings(Model): 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, } - def __init__(self, enabled, category=None, retention_policy=None): - super(LogSettings, self).__init__() - self.category = category - self.enabled = enabled - self.retention_policy = retention_policy + def __init__(self, **kwargs): + super(LogSettings, self).__init__(**kwargs) + self.category = kwargs.get('category', None) + self.enabled = kwargs.get('enabled', None) + self.retention_policy = kwargs.get('retention_policy', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings_py3.py new file mode 100644 index 000000000000..a1b7ac84dee6 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LogSettings(Model): + """Part of MultiTenantDiagnosticSettings. Specifies the settings for a + particular log. + + All required parameters must be populated in order to send to Azure. + + :param category: Name of a Diagnostic Log category for a resource type + this setting is applied to. To obtain the list of Diagnostic Log + categories for a resource, first perform a GET diagnostic settings + operation. + :type category: str + :param enabled: Required. a value indicating whether this log is enabled. + :type enabled: bool + :param retention_policy: the retention policy for this log. + :type retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__(self, *, enabled: bool, category: str=None, retention_policy=None, **kwargs) -> None: + super(LogSettings, self).__init__(**kwargs) + self.category = category + self.enabled = enabled + self.retention_policy = retention_policy diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition.py index 5e0e19292cac..1bbdf560448d 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition.py @@ -32,8 +32,8 @@ class ManagementEventAggregationCondition(Model): 'window_size': {'key': 'windowSize', 'type': 'duration'}, } - def __init__(self, operator=None, threshold=None, window_size=None): - super(ManagementEventAggregationCondition, self).__init__() - self.operator = operator - self.threshold = threshold - self.window_size = window_size + def __init__(self, **kwargs): + super(ManagementEventAggregationCondition, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.threshold = kwargs.get('threshold', None) + self.window_size = kwargs.get('window_size', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition_py3.py new file mode 100644 index 000000000000..4591b5292d5e --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementEventAggregationCondition(Model): + """How the data that is collected should be combined over time. + + :param operator: the condition operator. Possible values include: + 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual' + :type operator: str or ~azure.mgmt.monitor.models.ConditionOperator + :param threshold: The threshold value that activates the alert. + :type threshold: float + :param window_size: the period of time (in ISO 8601 duration format) that + is used to monitor alert activity based on the threshold. If specified + then it must be between 5 minutes and 1 day. + :type window_size: timedelta + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'ConditionOperator'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + } + + def __init__(self, *, operator=None, threshold: float=None, window_size=None, **kwargs) -> None: + super(ManagementEventAggregationCondition, self).__init__(**kwargs) + self.operator = operator + self.threshold = threshold + self.window_size = window_size diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition.py index 5c6775bb0f67..5aead2a65738 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition.py @@ -15,10 +15,12 @@ class ManagementEventRuleCondition(RuleCondition): """A management event rule condition. + All required parameters must be populated in order to send to Azure. + :param data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. :type data_source: ~azure.mgmt.monitor.models.RuleDataSource - :param odatatype: Constant filled by server. + :param odatatype: Required. Constant filled by server. :type odatatype: str :param aggregation: How the data that is collected should be combined over time and when the alert is activated. Note that for management event @@ -38,7 +40,7 @@ class ManagementEventRuleCondition(RuleCondition): 'aggregation': {'key': 'aggregation', 'type': 'ManagementEventAggregationCondition'}, } - def __init__(self, data_source=None, aggregation=None): - super(ManagementEventRuleCondition, self).__init__(data_source=data_source) - self.aggregation = aggregation + def __init__(self, **kwargs): + super(ManagementEventRuleCondition, self).__init__(**kwargs) + self.aggregation = kwargs.get('aggregation', None) self.odatatype = 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition_py3.py new file mode 100644 index 000000000000..6de67497fbcd --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .rule_condition import RuleCondition + + +class ManagementEventRuleCondition(RuleCondition): + """A management event rule condition. + + All required parameters must be populated in order to send to Azure. + + :param data_source: the resource from which the rule collects its data. + For this type dataSource will always be of type RuleMetricDataSource. + :type data_source: ~azure.mgmt.monitor.models.RuleDataSource + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param aggregation: How the data that is collected should be combined over + time and when the alert is activated. Note that for management event + alerts aggregation is optional – if it is not provided then any event will + cause the alert to activate. + :type aggregation: + ~azure.mgmt.monitor.models.ManagementEventAggregationCondition + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'aggregation': {'key': 'aggregation', 'type': 'ManagementEventAggregationCondition'}, + } + + def __init__(self, *, data_source=None, aggregation=None, **kwargs) -> None: + super(ManagementEventRuleCondition, self).__init__(data_source=data_source, **kwargs) + self.aggregation = aggregation + self.odatatype = 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value.py index 21d0ba797749..4ce548907f00 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value.py @@ -26,7 +26,7 @@ class MetadataValue(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name=None, value=None): - super(MetadataValue, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(MetadataValue, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value_py3.py new file mode 100644 index 000000000000..9e23ac9e985a --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetadataValue(Model): + """Represents a metric metadata value. + + :param name: the name of the metadata. + :type name: ~azure.mgmt.monitor.models.LocalizableString + :param value: the value of the metadata. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name=None, value: str=None, **kwargs) -> None: + super(MetadataValue, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric.py index 4ae5e08847bc..03cad7fe40ed 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric.py @@ -15,18 +15,20 @@ class Metric(Model): """The result data of a query. - :param id: the metric Id. + All required parameters must be populated in order to send to Azure. + + :param id: Required. the metric Id. :type id: str - :param type: the resource type of the metric resource. + :param type: Required. the resource type of the metric resource. :type type: str - :param name: the name and the display name of the metric, i.e. it is - localizable string. + :param name: Required. the name and the display name of the metric, i.e. + it is localizable string. :type name: ~azure.mgmt.monitor.models.LocalizableString - :param unit: the unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', 'Percent', - 'MilliSeconds', 'ByteSeconds', 'Unspecified' + :param unit: Required. the unit of the metric. Possible values include: + 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', + 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified' :type unit: str or ~azure.mgmt.monitor.models.Unit - :param timeseries: the time series returned when a data query is + :param timeseries: Required. the time series returned when a data query is performed. :type timeseries: list[~azure.mgmt.monitor.models.TimeSeriesElement] """ @@ -47,10 +49,10 @@ class Metric(Model): 'timeseries': {'key': 'timeseries', 'type': '[TimeSeriesElement]'}, } - def __init__(self, id, type, name, unit, timeseries): - super(Metric, self).__init__() - self.id = id - self.type = type - self.name = name - self.unit = unit - self.timeseries = timeseries + def __init__(self, **kwargs): + super(Metric, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.type = kwargs.get('type', None) + self.name = kwargs.get('name', None) + self.unit = kwargs.get('unit', None) + self.timeseries = kwargs.get('timeseries', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability.py index d46322343000..a50838988a18 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability.py @@ -29,7 +29,7 @@ class MetricAvailability(Model): 'retention': {'key': 'retention', 'type': 'duration'}, } - def __init__(self, time_grain=None, retention=None): - super(MetricAvailability, self).__init__() - self.time_grain = time_grain - self.retention = retention + def __init__(self, **kwargs): + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = kwargs.get('time_grain', None) + self.retention = kwargs.get('retention', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability_py3.py new file mode 100644 index 000000000000..32f1d11c91f7 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricAvailability(Model): + """Metric availability specifies the time grain (aggregation interval or + frequency) and the retention period for that time grain. + + :param time_grain: the time grain specifies the aggregation interval for + the metric. Expressed as a duration 'PT1M', 'P1D', etc. + :type time_grain: timedelta + :param retention: the retention period for the metric at the specified + timegrain. Expressed as a duration 'PT1M', 'P1D', etc. + :type retention: timedelta + """ + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'duration'}, + 'retention': {'key': 'retention', 'type': 'duration'}, + } + + def __init__(self, *, time_grain=None, retention=None, **kwargs) -> None: + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = time_grain + self.retention = retention diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition.py index 321a5a0781f2..4347bb0e6fd6 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition.py @@ -63,15 +63,15 @@ class MetricDefinition(Model): 'dimensions': {'key': 'dimensions', 'type': '[LocalizableString]'}, } - def __init__(self, is_dimension_required=None, resource_id=None, namespace=None, name=None, unit=None, primary_aggregation_type=None, supported_aggregation_types=None, metric_availabilities=None, id=None, dimensions=None): - super(MetricDefinition, self).__init__() - self.is_dimension_required = is_dimension_required - self.resource_id = resource_id - self.namespace = namespace - self.name = name - self.unit = unit - self.primary_aggregation_type = primary_aggregation_type - self.supported_aggregation_types = supported_aggregation_types - self.metric_availabilities = metric_availabilities - self.id = id - self.dimensions = dimensions + def __init__(self, **kwargs): + super(MetricDefinition, self).__init__(**kwargs) + self.is_dimension_required = kwargs.get('is_dimension_required', None) + self.resource_id = kwargs.get('resource_id', None) + self.namespace = kwargs.get('namespace', None) + self.name = kwargs.get('name', None) + self.unit = kwargs.get('unit', None) + self.primary_aggregation_type = kwargs.get('primary_aggregation_type', None) + self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + self.metric_availabilities = kwargs.get('metric_availabilities', None) + self.id = kwargs.get('id', None) + self.dimensions = kwargs.get('dimensions', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition_py3.py new file mode 100644 index 000000000000..7ec1d11d319e --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition_py3.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricDefinition(Model): + """Metric definition class specifies the metadata for a metric. + + :param is_dimension_required: Flag to indicate whether the dimension is + required. + :type is_dimension_required: bool + :param resource_id: the resource identifier of the resource that emitted + the metric. + :type resource_id: str + :param namespace: the namespace the metric blongs to. + :type namespace: str + :param name: the name and the display name of the metric, i.e. it is a + localizable string. + :type name: ~azure.mgmt.monitor.models.LocalizableString + :param unit: the unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', 'Percent', + 'MilliSeconds', 'ByteSeconds', 'Unspecified' + :type unit: str or ~azure.mgmt.monitor.models.Unit + :param primary_aggregation_type: the primary aggregation type value + defining how to use the values for display. Possible values include: + 'None', 'Average', 'Count', 'Minimum', 'Maximum', 'Total' + :type primary_aggregation_type: str or + ~azure.mgmt.monitor.models.AggregationType + :param supported_aggregation_types: the collection of what aggregation + types are supported. + :type supported_aggregation_types: list[str or + ~azure.mgmt.monitor.models.AggregationType] + :param metric_availabilities: the collection of what aggregation intervals + are available to be queried. + :type metric_availabilities: + list[~azure.mgmt.monitor.models.MetricAvailability] + :param id: the resource identifier of the metric definition. + :type id: str + :param dimensions: the name and the display name of the dimension, i.e. it + is a localizable string. + :type dimensions: list[~azure.mgmt.monitor.models.LocalizableString] + """ + + _attribute_map = { + 'is_dimension_required': {'key': 'isDimensionRequired', 'type': 'bool'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'unit': {'key': 'unit', 'type': 'Unit'}, + 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'AggregationType'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[AggregationType]'}, + 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[LocalizableString]'}, + } + + def __init__(self, *, is_dimension_required: bool=None, resource_id: str=None, namespace: str=None, name=None, unit=None, primary_aggregation_type=None, supported_aggregation_types=None, metric_availabilities=None, id: str=None, dimensions=None, **kwargs) -> None: + super(MetricDefinition, self).__init__(**kwargs) + self.is_dimension_required = is_dimension_required + self.resource_id = resource_id + self.namespace = namespace + self.name = name + self.unit = unit + self.primary_aggregation_type = primary_aggregation_type + self.supported_aggregation_types = supported_aggregation_types + self.metric_availabilities = metric_availabilities + self.id = id + self.dimensions = dimensions diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_py3.py new file mode 100644 index 000000000000..fde8b416e98f --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Metric(Model): + """The result data of a query. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. the metric Id. + :type id: str + :param type: Required. the resource type of the metric resource. + :type type: str + :param name: Required. the name and the display name of the metric, i.e. + it is localizable string. + :type name: ~azure.mgmt.monitor.models.LocalizableString + :param unit: Required. the unit of the metric. Possible values include: + 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', + 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified' + :type unit: str or ~azure.mgmt.monitor.models.Unit + :param timeseries: Required. the time series returned when a data query is + performed. + :type timeseries: list[~azure.mgmt.monitor.models.TimeSeriesElement] + """ + + _validation = { + 'id': {'required': True}, + 'type': {'required': True}, + 'name': {'required': True}, + 'unit': {'required': True}, + 'timeseries': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'unit': {'key': 'unit', 'type': 'Unit'}, + 'timeseries': {'key': 'timeseries', 'type': '[TimeSeriesElement]'}, + } + + def __init__(self, *, id: str, type: str, name, unit, timeseries, **kwargs) -> None: + super(Metric, self).__init__(**kwargs) + self.id = id + self.type = type + self.name = name + self.unit = unit + self.timeseries = timeseries diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings.py index 11de4a95fb41..e62931905b34 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings.py @@ -16,6 +16,8 @@ class MetricSettings(Model): """Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric. + All required parameters must be populated in order to send to Azure. + :param time_grain: the timegrain of the metric in ISO8601 format. :type time_grain: timedelta :param category: Name of a Diagnostic Metric category for a resource type @@ -23,7 +25,8 @@ class MetricSettings(Model): categories for a resource, first perform a GET diagnostic settings operation. :type category: str - :param enabled: a value indicating whether this category is enabled. + :param enabled: Required. a value indicating whether this category is + enabled. :type enabled: bool :param retention_policy: the retention policy for this category. :type retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy @@ -40,9 +43,9 @@ class MetricSettings(Model): 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, } - def __init__(self, enabled, time_grain=None, category=None, retention_policy=None): - super(MetricSettings, self).__init__() - self.time_grain = time_grain - self.category = category - self.enabled = enabled - self.retention_policy = retention_policy + def __init__(self, **kwargs): + super(MetricSettings, self).__init__(**kwargs) + self.time_grain = kwargs.get('time_grain', None) + self.category = kwargs.get('category', None) + self.enabled = kwargs.get('enabled', None) + self.retention_policy = kwargs.get('retention_policy', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings_py3.py new file mode 100644 index 000000000000..1fc0eb1ddb20 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricSettings(Model): + """Part of MultiTenantDiagnosticSettings. Specifies the settings for a + particular metric. + + All required parameters must be populated in order to send to Azure. + + :param time_grain: the timegrain of the metric in ISO8601 format. + :type time_grain: timedelta + :param category: Name of a Diagnostic Metric category for a resource type + this setting is applied to. To obtain the list of Diagnostic metric + categories for a resource, first perform a GET diagnostic settings + operation. + :type category: str + :param enabled: Required. a value indicating whether this category is + enabled. + :type enabled: bool + :param retention_policy: the retention policy for this category. + :type retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'duration'}, + 'category': {'key': 'category', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__(self, *, enabled: bool, time_grain=None, category: str=None, retention_policy=None, **kwargs) -> None: + super(MetricSettings, self).__init__(**kwargs) + self.time_grain = time_grain + self.category = category + self.enabled = enabled + self.retention_policy = retention_policy diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger.py index b374fb2a039a..0bc042577bb6 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger.py @@ -15,35 +15,39 @@ class MetricTrigger(Model): """The trigger that results in a scaling action. - :param metric_name: the name of the metric that defines what the rule - monitors. - :type metric_name: str - :param metric_resource_uri: the resource identifier of the resource the + All required parameters must be populated in order to send to Azure. + + :param metric_name: Required. the name of the metric that defines what the rule monitors. + :type metric_name: str + :param metric_resource_uri: Required. the resource identifier of the + resource the rule monitors. :type metric_resource_uri: str - :param time_grain: the granularity of metrics the rule monitors. Must be - one of the predefined values returned from metric definitions for the - metric. Must be between 12 hours and 1 minute. + :param time_grain: Required. the granularity of metrics the rule monitors. + Must be one of the predefined values returned from metric definitions for + the metric. Must be between 12 hours and 1 minute. :type time_grain: timedelta - :param statistic: the metric statistic type. How the metrics from multiple - instances are combined. Possible values include: 'Average', 'Min', 'Max', - 'Sum' + :param statistic: Required. the metric statistic type. How the metrics + from multiple instances are combined. Possible values include: 'Average', + 'Min', 'Max', 'Sum' :type statistic: str or ~azure.mgmt.monitor.models.MetricStatisticType - :param time_window: the range of time in which instance data is collected. - This value must be greater than the delay in metric collection, which can - vary from resource-to-resource. Must be between 12 hours and 5 minutes. + :param time_window: Required. the range of time in which instance data is + collected. This value must be greater than the delay in metric collection, + which can vary from resource-to-resource. Must be between 12 hours and 5 + minutes. :type time_window: timedelta - :param time_aggregation: time aggregation type. How the data that is - collected should be combined over time. The default value is Average. - Possible values include: 'Average', 'Minimum', 'Maximum', 'Total', 'Count' + :param time_aggregation: Required. time aggregation type. How the data + that is collected should be combined over time. The default value is + Average. Possible values include: 'Average', 'Minimum', 'Maximum', + 'Total', 'Count' :type time_aggregation: str or ~azure.mgmt.monitor.models.TimeAggregationType - :param operator: the operator that is used to compare the metric data and - the threshold. Possible values include: 'Equals', 'NotEquals', + :param operator: Required. the operator that is used to compare the metric + data and the threshold. Possible values include: 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual' :type operator: str or ~azure.mgmt.monitor.models.ComparisonOperationType - :param threshold: the threshold of the metric that triggers the scale - action. + :param threshold: Required. the threshold of the metric that triggers the + scale action. :type threshold: float """ @@ -69,13 +73,13 @@ class MetricTrigger(Model): 'threshold': {'key': 'threshold', 'type': 'float'}, } - def __init__(self, metric_name, metric_resource_uri, time_grain, statistic, time_window, time_aggregation, operator, threshold): - super(MetricTrigger, self).__init__() - self.metric_name = metric_name - self.metric_resource_uri = metric_resource_uri - self.time_grain = time_grain - self.statistic = statistic - self.time_window = time_window - self.time_aggregation = time_aggregation - self.operator = operator - self.threshold = threshold + def __init__(self, **kwargs): + super(MetricTrigger, self).__init__(**kwargs) + self.metric_name = kwargs.get('metric_name', None) + self.metric_resource_uri = kwargs.get('metric_resource_uri', None) + self.time_grain = kwargs.get('time_grain', None) + self.statistic = kwargs.get('statistic', None) + self.time_window = kwargs.get('time_window', None) + self.time_aggregation = kwargs.get('time_aggregation', None) + self.operator = kwargs.get('operator', None) + self.threshold = kwargs.get('threshold', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger_py3.py new file mode 100644 index 000000000000..991b29d2707c --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger_py3.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricTrigger(Model): + """The trigger that results in a scaling action. + + All required parameters must be populated in order to send to Azure. + + :param metric_name: Required. the name of the metric that defines what the + rule monitors. + :type metric_name: str + :param metric_resource_uri: Required. the resource identifier of the + resource the rule monitors. + :type metric_resource_uri: str + :param time_grain: Required. the granularity of metrics the rule monitors. + Must be one of the predefined values returned from metric definitions for + the metric. Must be between 12 hours and 1 minute. + :type time_grain: timedelta + :param statistic: Required. the metric statistic type. How the metrics + from multiple instances are combined. Possible values include: 'Average', + 'Min', 'Max', 'Sum' + :type statistic: str or ~azure.mgmt.monitor.models.MetricStatisticType + :param time_window: Required. the range of time in which instance data is + collected. This value must be greater than the delay in metric collection, + which can vary from resource-to-resource. Must be between 12 hours and 5 + minutes. + :type time_window: timedelta + :param time_aggregation: Required. time aggregation type. How the data + that is collected should be combined over time. The default value is + Average. Possible values include: 'Average', 'Minimum', 'Maximum', + 'Total', 'Count' + :type time_aggregation: str or + ~azure.mgmt.monitor.models.TimeAggregationType + :param operator: Required. the operator that is used to compare the metric + data and the threshold. Possible values include: 'Equals', 'NotEquals', + 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual' + :type operator: str or ~azure.mgmt.monitor.models.ComparisonOperationType + :param threshold: Required. the threshold of the metric that triggers the + scale action. + :type threshold: float + """ + + _validation = { + 'metric_name': {'required': True}, + 'metric_resource_uri': {'required': True}, + 'time_grain': {'required': True}, + 'statistic': {'required': True}, + 'time_window': {'required': True}, + 'time_aggregation': {'required': True}, + 'operator': {'required': True}, + 'threshold': {'required': True}, + } + + _attribute_map = { + 'metric_name': {'key': 'metricName', 'type': 'str'}, + 'metric_resource_uri': {'key': 'metricResourceUri', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'duration'}, + 'statistic': {'key': 'statistic', 'type': 'MetricStatisticType'}, + 'time_window': {'key': 'timeWindow', 'type': 'duration'}, + 'time_aggregation': {'key': 'timeAggregation', 'type': 'TimeAggregationType'}, + 'operator': {'key': 'operator', 'type': 'ComparisonOperationType'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + } + + def __init__(self, *, metric_name: str, metric_resource_uri: str, time_grain, statistic, time_window, time_aggregation, operator, threshold: float, **kwargs) -> None: + super(MetricTrigger, self).__init__(**kwargs) + self.metric_name = metric_name + self.metric_resource_uri = metric_resource_uri + self.time_grain = time_grain + self.statistic = statistic + self.time_window = time_window + self.time_aggregation = time_aggregation + self.operator = operator + self.threshold = threshold diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value.py index 5b5a550057ba..80af772b92be 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value.py @@ -15,7 +15,10 @@ class MetricValue(Model): """Represents a metric value. - :param time_stamp: the timestamp for the metric value in ISO 8601 format. + All required parameters must be populated in order to send to Azure. + + :param time_stamp: Required. the timestamp for the metric value in ISO + 8601 format. :type time_stamp: datetime :param average: the average value in the time range. :type average: float @@ -43,11 +46,11 @@ class MetricValue(Model): 'count': {'key': 'count', 'type': 'long'}, } - def __init__(self, time_stamp, average=None, minimum=None, maximum=None, total=None, count=None): - super(MetricValue, self).__init__() - self.time_stamp = time_stamp - self.average = average - self.minimum = minimum - self.maximum = maximum - self.total = total - self.count = count + def __init__(self, **kwargs): + super(MetricValue, self).__init__(**kwargs) + self.time_stamp = kwargs.get('time_stamp', None) + self.average = kwargs.get('average', None) + self.minimum = kwargs.get('minimum', None) + self.maximum = kwargs.get('maximum', None) + self.total = kwargs.get('total', None) + self.count = kwargs.get('count', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value_py3.py new file mode 100644 index 000000000000..c6c65186df25 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricValue(Model): + """Represents a metric value. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp: Required. the timestamp for the metric value in ISO + 8601 format. + :type time_stamp: datetime + :param average: the average value in the time range. + :type average: float + :param minimum: the least value in the time range. + :type minimum: float + :param maximum: the greatest value in the time range. + :type maximum: float + :param total: the sum of all of the values in the time range. + :type total: float + :param count: the number of samples in the time range. Can be used to + determine the number of values that contributed to the average value. + :type count: long + """ + + _validation = { + 'time_stamp': {'required': True}, + } + + _attribute_map = { + 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, + 'average': {'key': 'average', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'total': {'key': 'total', 'type': 'float'}, + 'count': {'key': 'count', 'type': 'long'}, + } + + def __init__(self, *, time_stamp, average: float=None, minimum: float=None, maximum: float=None, total: float=None, count: int=None, **kwargs) -> None: + super(MetricValue, self).__init__(**kwargs) + self.time_stamp = time_stamp + self.average = average + self.minimum = minimum + self.maximum = maximum + self.total = total + self.count = count diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/monitor_management_client_enums.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/monitor_management_client_enums.py index 9475e9ad4e05..0f3e04d11484 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/monitor_management_client_enums.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/monitor_management_client_enums.py @@ -12,7 +12,7 @@ from enum import Enum -class MetricStatisticType(Enum): +class MetricStatisticType(str, Enum): average = "Average" min = "Min" @@ -20,7 +20,7 @@ class MetricStatisticType(Enum): sum = "Sum" -class TimeAggregationType(Enum): +class TimeAggregationType(str, Enum): average = "Average" minimum = "Minimum" @@ -29,7 +29,7 @@ class TimeAggregationType(Enum): count = "Count" -class ComparisonOperationType(Enum): +class ComparisonOperationType(str, Enum): equals = "Equals" not_equals = "NotEquals" @@ -39,21 +39,21 @@ class ComparisonOperationType(Enum): less_than_or_equal = "LessThanOrEqual" -class ScaleDirection(Enum): +class ScaleDirection(str, Enum): none = "None" increase = "Increase" decrease = "Decrease" -class ScaleType(Enum): +class ScaleType(str, Enum): change_count = "ChangeCount" percent_change_count = "PercentChangeCount" exact_count = "ExactCount" -class RecurrenceFrequency(Enum): +class RecurrenceFrequency(str, Enum): none = "None" second = "Second" @@ -65,7 +65,7 @@ class RecurrenceFrequency(Enum): year = "Year" -class ConditionOperator(Enum): +class ConditionOperator(str, Enum): greater_than = "GreaterThan" greater_than_or_equal = "GreaterThanOrEqual" @@ -73,7 +73,7 @@ class ConditionOperator(Enum): less_than_or_equal = "LessThanOrEqual" -class TimeAggregationOperator(Enum): +class TimeAggregationOperator(str, Enum): average = "Average" minimum = "Minimum" @@ -82,20 +82,20 @@ class TimeAggregationOperator(Enum): last = "Last" -class CategoryType(Enum): +class CategoryType(str, Enum): metrics = "Metrics" logs = "Logs" -class ReceiverStatus(Enum): +class ReceiverStatus(str, Enum): not_specified = "NotSpecified" enabled = "Enabled" disabled = "Disabled" -class EventLevel(Enum): +class EventLevel(str, Enum): critical = "Critical" error = "Error" @@ -104,7 +104,7 @@ class EventLevel(Enum): verbose = "Verbose" -class Unit(Enum): +class Unit(str, Enum): count = "Count" bytes = "Bytes" @@ -117,7 +117,7 @@ class Unit(Enum): unspecified = "Unspecified" -class AggregationType(Enum): +class AggregationType(str, Enum): none = "None" average = "Average" @@ -127,14 +127,14 @@ class AggregationType(Enum): total = "Total" -class Sensitivity(Enum): +class Sensitivity(str, Enum): low = "Low" medium = "Medium" high = "High" -class ResultType(Enum): +class ResultType(str, Enum): data = "Data" metadata = "Metadata" diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation.py index dc5a77d93a18..0a5d8d878f02 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation.py @@ -26,7 +26,7 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'OperationDisplay'}, } - def __init__(self, name=None, display=None): - super(Operation, self).__init__() - self.name = name - self.display = display + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display.py index 82830778f953..55dcaf3793ab 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display.py @@ -30,8 +30,8 @@ class OperationDisplay(Model): 'operation': {'key': 'operation', 'type': 'str'}, } - def __init__(self, provider=None, resource=None, operation=None): - super(OperationDisplay, self).__init__() - self.provider = provider - self.resource = resource - self.operation = operation + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display_py3.py new file mode 100644 index 000000000000..22b9a326e4a0 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft.Insights + :type provider: str + :param resource: Resource on which the operation is performed: AlertRules, + Autoscale, etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result.py index 28f86e07b03a..6e7d1a8e5bce 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result.py @@ -29,7 +29,7 @@ class OperationListResult(Model): 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, value=None, next_link=None): - super(OperationListResult, self).__init__() - self.value = value - self.next_link = next_link + def __init__(self, **kwargs): + super(OperationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result_py3.py new file mode 100644 index 000000000000..8221d9c7a75d --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationListResult(Model): + """Result of the request to list Microsoft.Insights operations. It contains a + list of operations and a URL link to get the next set of results. + + :param value: List of operations supported by the Microsoft.Insights + provider. + :type value: list[~azure.mgmt.monitor.models.Operation] + :param next_link: URL to get the next set of operation list results if + there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(OperationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_py3.py new file mode 100644 index 000000000000..918a7f985873 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Microsoft Insights API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.monitor.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource.py index 3a9545a03ffe..9db3e9cb46e5 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource.py @@ -38,8 +38,8 @@ class ProxyOnlyResource(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self): - super(ProxyOnlyResource, self).__init__() + def __init__(self, **kwargs): + super(ProxyOnlyResource, self).__init__(**kwargs) self.id = None self.name = None self.type = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource_py3.py new file mode 100644 index 000000000000..4ba894b76537 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProxyOnlyResource(Model): + """A proxy only azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence.py index 5f918315655d..d9034ce60be9 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence.py @@ -16,12 +16,15 @@ class Recurrence(Model): """The repeating times at which this profile begins. This element is not used if the FixedDate element is used. - :param frequency: the recurrence frequency. How often the schedule profile - should take effect. This value must be Week, meaning each week will have - the same set of profiles. Possible values include: 'None', 'Second', - 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' + All required parameters must be populated in order to send to Azure. + + :param frequency: Required. the recurrence frequency. How often the + schedule profile should take effect. This value must be Week, meaning each + week will have the same set of profiles. Possible values include: 'None', + 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' :type frequency: str or ~azure.mgmt.monitor.models.RecurrenceFrequency - :param schedule: the scheduling constraints for when the profile begins. + :param schedule: Required. the scheduling constraints for when the profile + begins. :type schedule: ~azure.mgmt.monitor.models.RecurrentSchedule """ @@ -35,7 +38,7 @@ class Recurrence(Model): 'schedule': {'key': 'schedule', 'type': 'RecurrentSchedule'}, } - def __init__(self, frequency, schedule): - super(Recurrence, self).__init__() - self.frequency = frequency - self.schedule = schedule + def __init__(self, **kwargs): + super(Recurrence, self).__init__(**kwargs) + self.frequency = kwargs.get('frequency', None) + self.schedule = kwargs.get('schedule', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence_py3.py new file mode 100644 index 000000000000..759577e56a12 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Recurrence(Model): + """The repeating times at which this profile begins. This element is not used + if the FixedDate element is used. + + All required parameters must be populated in order to send to Azure. + + :param frequency: Required. the recurrence frequency. How often the + schedule profile should take effect. This value must be Week, meaning each + week will have the same set of profiles. Possible values include: 'None', + 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' + :type frequency: str or ~azure.mgmt.monitor.models.RecurrenceFrequency + :param schedule: Required. the scheduling constraints for when the profile + begins. + :type schedule: ~azure.mgmt.monitor.models.RecurrentSchedule + """ + + _validation = { + 'frequency': {'required': True}, + 'schedule': {'required': True}, + } + + _attribute_map = { + 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, + 'schedule': {'key': 'schedule', 'type': 'RecurrentSchedule'}, + } + + def __init__(self, *, frequency, schedule, **kwargs) -> None: + super(Recurrence, self).__init__(**kwargs) + self.frequency = frequency + self.schedule = schedule diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule.py index c862eb520257..68440d00078c 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule.py @@ -15,54 +15,56 @@ class RecurrentSchedule(Model): """The scheduling constraints for when the profile begins. - :param time_zone: the timezone for the hours of the profile. Some examples - of valid timezones are: Dateline Standard Time, UTC-11, Hawaiian Standard - Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific - Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), - Mountain Standard Time, Central America Standard Time, Central Standard - Time, Central Standard Time (Mexico), Canada Central Standard Time, SA - Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, - Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, - Central Brazilian Standard Time, SA Western Standard Time, Pacific SA - Standard Time, Newfoundland Standard Time, E. South America Standard Time, - Argentina Standard Time, SA Eastern Standard Time, Greenland Standard - Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic - Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco - Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe - Standard Time, Central Europe Standard Time, Romance Standard Time, - Central European Standard Time, W. Central Africa Standard Time, Namibia - Standard Time, Jordan Standard Time, GTB Standard Time, Middle East - Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe - Standard Time, South Africa Standard Time, FLE Standard Time, Turkey - Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya - Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard - Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, - Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, - Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, - Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard - Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard - Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard - Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia - Standard Time, North Asia Standard Time, China Standard Time, North Asia - East Standard Time, Singapore Standard Time, W. Australia Standard Time, - Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, - Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, - AUS Central Standard Time, E. Australia Standard Time, AUS Eastern - Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan - Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central - Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, - UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, - Samoa Standard Time, Line Islands Standard Time + All required parameters must be populated in order to send to Azure. + + :param time_zone: Required. the timezone for the hours of the profile. + Some examples of valid timezones are: Dateline Standard Time, UTC-11, + Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time + (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain + Standard Time (Mexico), Mountain Standard Time, Central America Standard + Time, Central Standard Time, Central Standard Time (Mexico), Canada + Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US + Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, + Atlantic Standard Time, Central Brazilian Standard Time, SA Western + Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. + South America Standard Time, Argentina Standard Time, SA Eastern Standard + Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard + Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde + Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich + Standard Time, W. Europe Standard Time, Central Europe Standard Time, + Romance Standard Time, Central European Standard Time, W. Central Africa + Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard + Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, + E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, + Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, + Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus + Standard Time, Russian Standard Time, E. Africa Standard Time, Iran + Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia + Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus + Standard Time, Afghanistan Standard Time, West Asia Standard Time, + Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, + Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, + Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard + Time, SE Asia Standard Time, North Asia Standard Time, China Standard + Time, North Asia East Standard Time, Singapore Standard Time, W. Australia + Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo + Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia + Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS + Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, + Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, + Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard + Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard + Time, Samoa Standard Time, Line Islands Standard Time :type time_zone: str - :param days: the collection of days that the profile takes effect on. - Possible values are Sunday through Saturday. + :param days: Required. the collection of days that the profile takes + effect on. Possible values are Sunday through Saturday. :type days: list[str] - :param hours: A collection of hours that the profile takes effect on. - Values supported are 0 to 23 on the 24-hour clock (AM/PM times are not - supported). + :param hours: Required. A collection of hours that the profile takes + effect on. Values supported are 0 to 23 on the 24-hour clock (AM/PM times + are not supported). :type hours: list[int] - :param minutes: A collection of minutes at which the profile takes effect - at. + :param minutes: Required. A collection of minutes at which the profile + takes effect at. :type minutes: list[int] """ @@ -80,9 +82,9 @@ class RecurrentSchedule(Model): 'minutes': {'key': 'minutes', 'type': '[int]'}, } - def __init__(self, time_zone, days, hours, minutes): - super(RecurrentSchedule, self).__init__() - self.time_zone = time_zone - self.days = days - self.hours = hours - self.minutes = minutes + def __init__(self, **kwargs): + super(RecurrentSchedule, self).__init__(**kwargs) + self.time_zone = kwargs.get('time_zone', None) + self.days = kwargs.get('days', None) + self.hours = kwargs.get('hours', None) + self.minutes = kwargs.get('minutes', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule_py3.py new file mode 100644 index 000000000000..b5eaffff3542 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule_py3.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RecurrentSchedule(Model): + """The scheduling constraints for when the profile begins. + + All required parameters must be populated in order to send to Azure. + + :param time_zone: Required. the timezone for the hours of the profile. + Some examples of valid timezones are: Dateline Standard Time, UTC-11, + Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time + (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain + Standard Time (Mexico), Mountain Standard Time, Central America Standard + Time, Central Standard Time, Central Standard Time (Mexico), Canada + Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US + Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, + Atlantic Standard Time, Central Brazilian Standard Time, SA Western + Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. + South America Standard Time, Argentina Standard Time, SA Eastern Standard + Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard + Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde + Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich + Standard Time, W. Europe Standard Time, Central Europe Standard Time, + Romance Standard Time, Central European Standard Time, W. Central Africa + Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard + Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, + E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, + Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, + Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus + Standard Time, Russian Standard Time, E. Africa Standard Time, Iran + Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia + Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus + Standard Time, Afghanistan Standard Time, West Asia Standard Time, + Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, + Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, + Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard + Time, SE Asia Standard Time, North Asia Standard Time, China Standard + Time, North Asia East Standard Time, Singapore Standard Time, W. Australia + Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo + Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia + Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS + Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, + Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, + Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard + Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard + Time, Samoa Standard Time, Line Islands Standard Time + :type time_zone: str + :param days: Required. the collection of days that the profile takes + effect on. Possible values are Sunday through Saturday. + :type days: list[str] + :param hours: Required. A collection of hours that the profile takes + effect on. Values supported are 0 to 23 on the 24-hour clock (AM/PM times + are not supported). + :type hours: list[int] + :param minutes: Required. A collection of minutes at which the profile + takes effect at. + :type minutes: list[int] + """ + + _validation = { + 'time_zone': {'required': True}, + 'days': {'required': True}, + 'hours': {'required': True}, + 'minutes': {'required': True}, + } + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'days': {'key': 'days', 'type': '[str]'}, + 'hours': {'key': 'hours', 'type': '[int]'}, + 'minutes': {'key': 'minutes', 'type': '[int]'}, + } + + def __init__(self, *, time_zone: str, days, hours, minutes, **kwargs) -> None: + super(RecurrentSchedule, self).__init__(**kwargs) + self.time_zone = time_zone + self.days = days + self.hours = hours + self.minutes = minutes diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/resource.py index 1552cf70c86d..a081f9d31754 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/resource.py @@ -18,13 +18,15 @@ class Resource(Model): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id :vartype id: str :ivar name: Azure resource name :vartype name: str :ivar type: Azure resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags :type tags: dict[str, str] @@ -45,10 +47,10 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location, tags=None): - super(Resource, self).__init__() + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = location - self.tags = tags + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/resource_py3.py new file mode 100644 index 000000000000..8411fb563e05 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/resource_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/response.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/response.py index 3f62025c3d5a..c3b4eb5e2ad2 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/response.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/response.py @@ -15,12 +15,14 @@ class Response(Model): """The response to a metrics query. + All required parameters must be populated in order to send to Azure. + :param cost: The integer value representing the cost of the query, for data case. :type cost: float - :param timespan: The timespan for which the data was retrieved. Its value - consists of two datatimes concatenated, separated by '/'. This may be - adjusted in the future and returned back from what was originally + :param timespan: Required. The timespan for which the data was retrieved. + Its value consists of two datatimes concatenated, separated by '/'. This + may be adjusted in the future and returned back from what was originally requested. :type timespan: str :param interval: The interval (window size) for which the metric data was @@ -33,7 +35,7 @@ class Response(Model): :param resourceregion: The region of the resource been queried for metrics. :type resourceregion: str - :param value: the value of the collection. + :param value: Required. the value of the collection. :type value: list[~azure.mgmt.monitor.models.Metric] """ @@ -52,11 +54,11 @@ class Response(Model): 'value': {'key': 'value', 'type': '[Metric]'}, } - def __init__(self, timespan, value, cost=None, interval=None, namespace=None, resourceregion=None): - super(Response, self).__init__() - self.cost = cost - self.timespan = timespan - self.interval = interval - self.namespace = namespace - self.resourceregion = resourceregion - self.value = value + def __init__(self, **kwargs): + super(Response, self).__init__(**kwargs) + self.cost = kwargs.get('cost', None) + self.timespan = kwargs.get('timespan', None) + self.interval = kwargs.get('interval', None) + self.namespace = kwargs.get('namespace', None) + self.resourceregion = kwargs.get('resourceregion', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/response_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/response_py3.py new file mode 100644 index 000000000000..9816e6052b09 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/response_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Response(Model): + """The response to a metrics query. + + All required parameters must be populated in order to send to Azure. + + :param cost: The integer value representing the cost of the query, for + data case. + :type cost: float + :param timespan: Required. The timespan for which the data was retrieved. + Its value consists of two datatimes concatenated, separated by '/'. This + may be adjusted in the future and returned back from what was originally + requested. + :type timespan: str + :param interval: The interval (window size) for which the metric data was + returned in. This may be adjusted in the future and returned back from + what was originally requested. This is not present if a metadata request + was made. + :type interval: timedelta + :param namespace: The namespace of the metrics been queried + :type namespace: str + :param resourceregion: The region of the resource been queried for + metrics. + :type resourceregion: str + :param value: Required. the value of the collection. + :type value: list[~azure.mgmt.monitor.models.Metric] + """ + + _validation = { + 'cost': {'minimum': 0}, + 'timespan': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'cost': {'key': 'cost', 'type': 'float'}, + 'timespan': {'key': 'timespan', 'type': 'str'}, + 'interval': {'key': 'interval', 'type': 'duration'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'resourceregion': {'key': 'resourceregion', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[Metric]'}, + } + + def __init__(self, *, timespan: str, value, cost: float=None, interval=None, namespace: str=None, resourceregion: str=None, **kwargs) -> None: + super(Response, self).__init__(**kwargs) + self.cost = cost + self.timespan = timespan + self.interval = interval + self.namespace = namespace + self.resourceregion = resourceregion + self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy.py index 883bbd32f622..cca287401ccd 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy.py @@ -15,11 +15,13 @@ class RetentionPolicy(Model): """Specifies the retention policy for the log. - :param enabled: a value indicating whether the retention policy is - enabled. + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. a value indicating whether the retention policy + is enabled. :type enabled: bool - :param days: the number of days for the retention in days. A value of 0 - will retain the events indefinitely. + :param days: Required. the number of days for the retention in days. A + value of 0 will retain the events indefinitely. :type days: int """ @@ -33,7 +35,7 @@ class RetentionPolicy(Model): 'days': {'key': 'days', 'type': 'int'}, } - def __init__(self, enabled, days): - super(RetentionPolicy, self).__init__() - self.enabled = enabled - self.days = days + def __init__(self, **kwargs): + super(RetentionPolicy, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.days = kwargs.get('days', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy_py3.py new file mode 100644 index 000000000000..ffc9a5fbaab0 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RetentionPolicy(Model): + """Specifies the retention policy for the log. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. a value indicating whether the retention policy + is enabled. + :type enabled: bool + :param days: Required. the number of days for the retention in days. A + value of 0 will retain the events indefinitely. + :type days: int + """ + + _validation = { + 'enabled': {'required': True}, + 'days': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'days': {'key': 'days', 'type': 'int'}, + } + + def __init__(self, *, enabled: bool, days: int, **kwargs) -> None: + super(RetentionPolicy, self).__init__(**kwargs) + self.enabled = enabled + self.days = days diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action.py index 3eb36c4a18c6..3fbc729ef113 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action.py @@ -19,7 +19,9 @@ class RuleAction(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: RuleEmailAction, RuleWebhookAction - :param odatatype: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. :type odatatype: str """ @@ -35,6 +37,6 @@ class RuleAction(Model): 'odatatype': {'Microsoft.Azure.Management.Insights.Models.RuleEmailAction': 'RuleEmailAction', 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction': 'RuleWebhookAction'} } - def __init__(self): - super(RuleAction, self).__init__() + def __init__(self, **kwargs): + super(RuleAction, self).__init__(**kwargs) self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action_py3.py new file mode 100644 index 000000000000..32207256e690 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RuleAction(Model): + """The action that is performed when the alert rule becomes active, and when + an alert condition is resolved. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RuleEmailAction, RuleWebhookAction + + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. + :type odatatype: str + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odatatype': {'Microsoft.Azure.Management.Insights.Models.RuleEmailAction': 'RuleEmailAction', 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction': 'RuleWebhookAction'} + } + + def __init__(self, **kwargs) -> None: + super(RuleAction, self).__init__(**kwargs) + self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition.py index ec5456c825d5..e6dcfefd8409 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition.py @@ -19,10 +19,12 @@ class RuleCondition(Model): sub-classes are: ThresholdRuleCondition, LocationThresholdRuleCondition, ManagementEventRuleCondition + All required parameters must be populated in order to send to Azure. + :param data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. :type data_source: ~azure.mgmt.monitor.models.RuleDataSource - :param odatatype: Constant filled by server. + :param odatatype: Required. Constant filled by server. :type odatatype: str """ @@ -39,7 +41,7 @@ class RuleCondition(Model): 'odatatype': {'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition': 'ThresholdRuleCondition', 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition': 'LocationThresholdRuleCondition', 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition': 'ManagementEventRuleCondition'} } - def __init__(self, data_source=None): - super(RuleCondition, self).__init__() - self.data_source = data_source + def __init__(self, **kwargs): + super(RuleCondition, self).__init__(**kwargs) + self.data_source = kwargs.get('data_source', None) self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition_py3.py new file mode 100644 index 000000000000..6e97fff6db18 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RuleCondition(Model): + """The condition that results in the alert rule being activated. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ThresholdRuleCondition, LocationThresholdRuleCondition, + ManagementEventRuleCondition + + All required parameters must be populated in order to send to Azure. + + :param data_source: the resource from which the rule collects its data. + For this type dataSource will always be of type RuleMetricDataSource. + :type data_source: ~azure.mgmt.monitor.models.RuleDataSource + :param odatatype: Required. Constant filled by server. + :type odatatype: str + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odatatype': {'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition': 'ThresholdRuleCondition', 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition': 'LocationThresholdRuleCondition', 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition': 'ManagementEventRuleCondition'} + } + + def __init__(self, *, data_source=None, **kwargs) -> None: + super(RuleCondition, self).__init__(**kwargs) + self.data_source = data_source + self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source.py index 49352fbec023..bd87a54ca8a9 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source.py @@ -18,10 +18,12 @@ class RuleDataSource(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: RuleMetricDataSource, RuleManagementEventDataSource + All required parameters must be populated in order to send to Azure. + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule. :type resource_uri: str - :param odatatype: Constant filled by server. + :param odatatype: Required. Constant filled by server. :type odatatype: str """ @@ -38,7 +40,7 @@ class RuleDataSource(Model): 'odatatype': {'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource': 'RuleMetricDataSource', 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource': 'RuleManagementEventDataSource'} } - def __init__(self, resource_uri=None): - super(RuleDataSource, self).__init__() - self.resource_uri = resource_uri + def __init__(self, **kwargs): + super(RuleDataSource, self).__init__(**kwargs) + self.resource_uri = kwargs.get('resource_uri', None) self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source_py3.py new file mode 100644 index 000000000000..5b5971d7ad4e --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RuleDataSource(Model): + """The resource from which the rule collects its data. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RuleMetricDataSource, RuleManagementEventDataSource + + All required parameters must be populated in order to send to Azure. + + :param resource_uri: the resource identifier of the resource the rule + monitors. **NOTE**: this property cannot be updated for an existing rule. + :type resource_uri: str + :param odatatype: Required. Constant filled by server. + :type odatatype: str + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odatatype': {'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource': 'RuleMetricDataSource', 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource': 'RuleManagementEventDataSource'} + } + + def __init__(self, *, resource_uri: str=None, **kwargs) -> None: + super(RuleDataSource, self).__init__(**kwargs) + self.resource_uri = resource_uri + self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action.py index f9e2cb4af4ce..d22d3ce52458 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action.py @@ -16,7 +16,9 @@ class RuleEmailAction(RuleAction): """Specifies the action to send email when the rule condition is evaluated. The discriminator is always RuleEmailAction in this case. - :param odatatype: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. :type odatatype: str :param send_to_service_owners: Whether the administrators (service and co-administrators) of the service should be notified when the alert is @@ -37,8 +39,8 @@ class RuleEmailAction(RuleAction): 'custom_emails': {'key': 'customEmails', 'type': '[str]'}, } - def __init__(self, send_to_service_owners=None, custom_emails=None): - super(RuleEmailAction, self).__init__() - self.send_to_service_owners = send_to_service_owners - self.custom_emails = custom_emails + def __init__(self, **kwargs): + super(RuleEmailAction, self).__init__(**kwargs) + self.send_to_service_owners = kwargs.get('send_to_service_owners', None) + self.custom_emails = kwargs.get('custom_emails', None) self.odatatype = 'Microsoft.Azure.Management.Insights.Models.RuleEmailAction' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action_py3.py new file mode 100644 index 000000000000..2734c265a97e --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .rule_action import RuleAction + + +class RuleEmailAction(RuleAction): + """Specifies the action to send email when the rule condition is evaluated. + The discriminator is always RuleEmailAction in this case. + + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param send_to_service_owners: Whether the administrators (service and + co-administrators) of the service should be notified when the alert is + activated. + :type send_to_service_owners: bool + :param custom_emails: the list of administrator's custom email addresses + to notify of the activation of the alert. + :type custom_emails: list[str] + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'send_to_service_owners': {'key': 'sendToServiceOwners', 'type': 'bool'}, + 'custom_emails': {'key': 'customEmails', 'type': '[str]'}, + } + + def __init__(self, *, send_to_service_owners: bool=None, custom_emails=None, **kwargs) -> None: + super(RuleEmailAction, self).__init__(, **kwargs) + self.send_to_service_owners = send_to_service_owners + self.custom_emails = custom_emails + self.odatatype = 'Microsoft.Azure.Management.Insights.Models.RuleEmailAction' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source.py index ebb474e18727..1f31cdbcc3a7 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source.py @@ -23,6 +23,6 @@ class RuleManagementEventClaimsDataSource(Model): 'email_address': {'key': 'emailAddress', 'type': 'str'}, } - def __init__(self, email_address=None): - super(RuleManagementEventClaimsDataSource, self).__init__() - self.email_address = email_address + def __init__(self, **kwargs): + super(RuleManagementEventClaimsDataSource, self).__init__(**kwargs) + self.email_address = kwargs.get('email_address', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source_py3.py new file mode 100644 index 000000000000..86f5d6e66e68 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RuleManagementEventClaimsDataSource(Model): + """The claims for a rule management event data source. + + :param email_address: the email address. + :type email_address: str + """ + + _attribute_map = { + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + } + + def __init__(self, *, email_address: str=None, **kwargs) -> None: + super(RuleManagementEventClaimsDataSource, self).__init__(**kwargs) + self.email_address = email_address diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source.py index af6c99f92e25..01afeb1b0784 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source.py @@ -16,10 +16,12 @@ class RuleManagementEventDataSource(RuleDataSource): """A rule management event data source. The discriminator fields is always RuleManagementEventDataSource in this case. + All required parameters must be populated in order to send to Azure. + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule. :type resource_uri: str - :param odatatype: Constant filled by server. + :param odatatype: Required. Constant filled by server. :type odatatype: str :param event_name: the event name. :type event_name: str @@ -62,15 +64,15 @@ class RuleManagementEventDataSource(RuleDataSource): 'claims': {'key': 'claims', 'type': 'RuleManagementEventClaimsDataSource'}, } - def __init__(self, resource_uri=None, event_name=None, event_source=None, level=None, operation_name=None, resource_group_name=None, resource_provider_name=None, status=None, sub_status=None, claims=None): - super(RuleManagementEventDataSource, self).__init__(resource_uri=resource_uri) - self.event_name = event_name - self.event_source = event_source - self.level = level - self.operation_name = operation_name - self.resource_group_name = resource_group_name - self.resource_provider_name = resource_provider_name - self.status = status - self.sub_status = sub_status - self.claims = claims + def __init__(self, **kwargs): + super(RuleManagementEventDataSource, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + self.event_source = kwargs.get('event_source', None) + self.level = kwargs.get('level', None) + self.operation_name = kwargs.get('operation_name', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.resource_provider_name = kwargs.get('resource_provider_name', None) + self.status = kwargs.get('status', None) + self.sub_status = kwargs.get('sub_status', None) + self.claims = kwargs.get('claims', None) self.odatatype = 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source_py3.py new file mode 100644 index 000000000000..5bf22d45150d --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source_py3.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .rule_data_source import RuleDataSource + + +class RuleManagementEventDataSource(RuleDataSource): + """A rule management event data source. The discriminator fields is always + RuleManagementEventDataSource in this case. + + All required parameters must be populated in order to send to Azure. + + :param resource_uri: the resource identifier of the resource the rule + monitors. **NOTE**: this property cannot be updated for an existing rule. + :type resource_uri: str + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param event_name: the event name. + :type event_name: str + :param event_source: the event source. + :type event_source: str + :param level: the level. + :type level: str + :param operation_name: The name of the operation that should be checked + for. If no name is provided, any operation will match. + :type operation_name: str + :param resource_group_name: the resource group name. + :type resource_group_name: str + :param resource_provider_name: the resource provider name. + :type resource_provider_name: str + :param status: The status of the operation that should be checked for. If + no status is provided, any status will match. + :type status: str + :param sub_status: the substatus. + :type sub_status: str + :param claims: the claims. + :type claims: + ~azure.mgmt.monitor.models.RuleManagementEventClaimsDataSource + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'event_source': {'key': 'eventSource', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'resource_provider_name': {'key': 'resourceProviderName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'sub_status': {'key': 'subStatus', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'RuleManagementEventClaimsDataSource'}, + } + + def __init__(self, *, resource_uri: str=None, event_name: str=None, event_source: str=None, level: str=None, operation_name: str=None, resource_group_name: str=None, resource_provider_name: str=None, status: str=None, sub_status: str=None, claims=None, **kwargs) -> None: + super(RuleManagementEventDataSource, self).__init__(resource_uri=resource_uri, **kwargs) + self.event_name = event_name + self.event_source = event_source + self.level = level + self.operation_name = operation_name + self.resource_group_name = resource_group_name + self.resource_provider_name = resource_provider_name + self.status = status + self.sub_status = sub_status + self.claims = claims + self.odatatype = 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source.py index d18479246de7..472762df29c4 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source.py @@ -16,10 +16,12 @@ class RuleMetricDataSource(RuleDataSource): """A rule metric data source. The discriminator value is always RuleMetricDataSource in this case. + All required parameters must be populated in order to send to Azure. + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule. :type resource_uri: str - :param odatatype: Constant filled by server. + :param odatatype: Required. Constant filled by server. :type odatatype: str :param metric_name: the name of the metric that defines what the rule monitors. @@ -36,7 +38,7 @@ class RuleMetricDataSource(RuleDataSource): 'metric_name': {'key': 'metricName', 'type': 'str'}, } - def __init__(self, resource_uri=None, metric_name=None): - super(RuleMetricDataSource, self).__init__(resource_uri=resource_uri) - self.metric_name = metric_name + def __init__(self, **kwargs): + super(RuleMetricDataSource, self).__init__(**kwargs) + self.metric_name = kwargs.get('metric_name', None) self.odatatype = 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source_py3.py new file mode 100644 index 000000000000..d29e9ecf9fd1 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .rule_data_source import RuleDataSource + + +class RuleMetricDataSource(RuleDataSource): + """A rule metric data source. The discriminator value is always + RuleMetricDataSource in this case. + + All required parameters must be populated in order to send to Azure. + + :param resource_uri: the resource identifier of the resource the rule + monitors. **NOTE**: this property cannot be updated for an existing rule. + :type resource_uri: str + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param metric_name: the name of the metric that defines what the rule + monitors. + :type metric_name: str + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'metric_name': {'key': 'metricName', 'type': 'str'}, + } + + def __init__(self, *, resource_uri: str=None, metric_name: str=None, **kwargs) -> None: + super(RuleMetricDataSource, self).__init__(resource_uri=resource_uri, **kwargs) + self.metric_name = metric_name + self.odatatype = 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action.py index 16a1055e7cf3..88a3ef2004c6 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action.py @@ -16,7 +16,9 @@ class RuleWebhookAction(RuleAction): """Specifies the action to post to service when the rule condition is evaluated. The discriminator is always RuleWebhookAction in this case. - :param odatatype: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. :type odatatype: str :param service_uri: the service uri to Post the notification when the alert activates or resolves. @@ -36,8 +38,8 @@ class RuleWebhookAction(RuleAction): 'properties': {'key': 'properties', 'type': '{str}'}, } - def __init__(self, service_uri=None, properties=None): - super(RuleWebhookAction, self).__init__() - self.service_uri = service_uri - self.properties = properties + def __init__(self, **kwargs): + super(RuleWebhookAction, self).__init__(**kwargs) + self.service_uri = kwargs.get('service_uri', None) + self.properties = kwargs.get('properties', None) self.odatatype = 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action_py3.py new file mode 100644 index 000000000000..06de75307ca2 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .rule_action import RuleAction + + +class RuleWebhookAction(RuleAction): + """Specifies the action to post to service when the rule condition is + evaluated. The discriminator is always RuleWebhookAction in this case. + + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param service_uri: the service uri to Post the notification when the + alert activates or resolves. + :type service_uri: str + :param properties: the dictionary of custom properties to include with the + post operation. These data are appended to the webhook payload. + :type properties: dict[str, str] + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__(self, *, service_uri: str=None, properties=None, **kwargs) -> None: + super(RuleWebhookAction, self).__init__(, **kwargs) + self.service_uri = service_uri + self.properties = properties + self.odatatype = 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action.py index 4e4ed1ffb2ec..353e37d1ead5 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action.py @@ -15,21 +15,23 @@ class ScaleAction(Model): """The parameters for the scaling action. - :param direction: the scale direction. Whether the scaling action - increases or decreases the number of instances. Possible values include: - 'None', 'Increase', 'Decrease' + All required parameters must be populated in order to send to Azure. + + :param direction: Required. the scale direction. Whether the scaling + action increases or decreases the number of instances. Possible values + include: 'None', 'Increase', 'Decrease' :type direction: str or ~azure.mgmt.monitor.models.ScaleDirection - :param type: the type of action that should occur when the scale rule - fires. Possible values include: 'ChangeCount', 'PercentChangeCount', + :param type: Required. the type of action that should occur when the scale + rule fires. Possible values include: 'ChangeCount', 'PercentChangeCount', 'ExactCount' :type type: str or ~azure.mgmt.monitor.models.ScaleType :param value: the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1. Default value: "1" . :type value: str - :param cooldown: the amount of time to wait since the last scaling action - before this action occurs. It must be between 1 week and 1 minute in ISO - 8601 format. + :param cooldown: Required. the amount of time to wait since the last + scaling action before this action occurs. It must be between 1 week and 1 + minute in ISO 8601 format. :type cooldown: timedelta """ @@ -46,9 +48,9 @@ class ScaleAction(Model): 'cooldown': {'key': 'cooldown', 'type': 'duration'}, } - def __init__(self, direction, type, cooldown, value="1"): - super(ScaleAction, self).__init__() - self.direction = direction - self.type = type - self.value = value - self.cooldown = cooldown + def __init__(self, **kwargs): + super(ScaleAction, self).__init__(**kwargs) + self.direction = kwargs.get('direction', None) + self.type = kwargs.get('type', None) + self.value = kwargs.get('value', "1") + self.cooldown = kwargs.get('cooldown', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action_py3.py new file mode 100644 index 000000000000..0e1d4639879e --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScaleAction(Model): + """The parameters for the scaling action. + + All required parameters must be populated in order to send to Azure. + + :param direction: Required. the scale direction. Whether the scaling + action increases or decreases the number of instances. Possible values + include: 'None', 'Increase', 'Decrease' + :type direction: str or ~azure.mgmt.monitor.models.ScaleDirection + :param type: Required. the type of action that should occur when the scale + rule fires. Possible values include: 'ChangeCount', 'PercentChangeCount', + 'ExactCount' + :type type: str or ~azure.mgmt.monitor.models.ScaleType + :param value: the number of instances that are involved in the scaling + action. This value must be 1 or greater. The default value is 1. Default + value: "1" . + :type value: str + :param cooldown: Required. the amount of time to wait since the last + scaling action before this action occurs. It must be between 1 week and 1 + minute in ISO 8601 format. + :type cooldown: timedelta + """ + + _validation = { + 'direction': {'required': True}, + 'type': {'required': True}, + 'cooldown': {'required': True}, + } + + _attribute_map = { + 'direction': {'key': 'direction', 'type': 'ScaleDirection'}, + 'type': {'key': 'type', 'type': 'ScaleType'}, + 'value': {'key': 'value', 'type': 'str'}, + 'cooldown': {'key': 'cooldown', 'type': 'duration'}, + } + + def __init__(self, *, direction, type, cooldown, value: str="1", **kwargs) -> None: + super(ScaleAction, self).__init__(**kwargs) + self.direction = direction + self.type = type + self.value = value + self.cooldown = cooldown diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity.py index 98db9fb3279f..3e3e0a228333 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity.py @@ -15,15 +15,18 @@ class ScaleCapacity(Model): """The number of instances that can be used during this profile. - :param minimum: the minimum number of instances for the resource. + All required parameters must be populated in order to send to Azure. + + :param minimum: Required. the minimum number of instances for the + resource. :type minimum: str - :param maximum: the maximum number of instances for the resource. The - actual maximum number of instances is limited by the cores that are - available in the subscription. + :param maximum: Required. the maximum number of instances for the + resource. The actual maximum number of instances is limited by the cores + that are available in the subscription. :type maximum: str - :param default: the number of instances that will be set if metrics are - not available for evaluation. The default is only used if the current - instance count is lower than the default. + :param default: Required. the number of instances that will be set if + metrics are not available for evaluation. The default is only used if the + current instance count is lower than the default. :type default: str """ @@ -39,8 +42,8 @@ class ScaleCapacity(Model): 'default': {'key': 'default', 'type': 'str'}, } - def __init__(self, minimum, maximum, default): - super(ScaleCapacity, self).__init__() - self.minimum = minimum - self.maximum = maximum - self.default = default + def __init__(self, **kwargs): + super(ScaleCapacity, self).__init__(**kwargs) + self.minimum = kwargs.get('minimum', None) + self.maximum = kwargs.get('maximum', None) + self.default = kwargs.get('default', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity_py3.py new file mode 100644 index 000000000000..c69b76c8a4d3 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScaleCapacity(Model): + """The number of instances that can be used during this profile. + + All required parameters must be populated in order to send to Azure. + + :param minimum: Required. the minimum number of instances for the + resource. + :type minimum: str + :param maximum: Required. the maximum number of instances for the + resource. The actual maximum number of instances is limited by the cores + that are available in the subscription. + :type maximum: str + :param default: Required. the number of instances that will be set if + metrics are not available for evaluation. The default is only used if the + current instance count is lower than the default. + :type default: str + """ + + _validation = { + 'minimum': {'required': True}, + 'maximum': {'required': True}, + 'default': {'required': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'str'}, + 'maximum': {'key': 'maximum', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'str'}, + } + + def __init__(self, *, minimum: str, maximum: str, default: str, **kwargs) -> None: + super(ScaleCapacity, self).__init__(**kwargs) + self.minimum = minimum + self.maximum = maximum + self.default = default diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule.py index f210b77581ee..ef2cc94480d2 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule.py @@ -15,9 +15,12 @@ class ScaleRule(Model): """A rule that provide the triggers and parameters for the scaling action. - :param metric_trigger: the trigger that results in a scaling action. + All required parameters must be populated in order to send to Azure. + + :param metric_trigger: Required. the trigger that results in a scaling + action. :type metric_trigger: ~azure.mgmt.monitor.models.MetricTrigger - :param scale_action: the parameters for the scaling action. + :param scale_action: Required. the parameters for the scaling action. :type scale_action: ~azure.mgmt.monitor.models.ScaleAction """ @@ -31,7 +34,7 @@ class ScaleRule(Model): 'scale_action': {'key': 'scaleAction', 'type': 'ScaleAction'}, } - def __init__(self, metric_trigger, scale_action): - super(ScaleRule, self).__init__() - self.metric_trigger = metric_trigger - self.scale_action = scale_action + def __init__(self, **kwargs): + super(ScaleRule, self).__init__(**kwargs) + self.metric_trigger = kwargs.get('metric_trigger', None) + self.scale_action = kwargs.get('scale_action', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule_py3.py new file mode 100644 index 000000000000..2fe2640f9f4d --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScaleRule(Model): + """A rule that provide the triggers and parameters for the scaling action. + + All required parameters must be populated in order to send to Azure. + + :param metric_trigger: Required. the trigger that results in a scaling + action. + :type metric_trigger: ~azure.mgmt.monitor.models.MetricTrigger + :param scale_action: Required. the parameters for the scaling action. + :type scale_action: ~azure.mgmt.monitor.models.ScaleAction + """ + + _validation = { + 'metric_trigger': {'required': True}, + 'scale_action': {'required': True}, + } + + _attribute_map = { + 'metric_trigger': {'key': 'metricTrigger', 'type': 'MetricTrigger'}, + 'scale_action': {'key': 'scaleAction', 'type': 'ScaleAction'}, + } + + def __init__(self, *, metric_trigger, scale_action, **kwargs) -> None: + super(ScaleRule, self).__init__(**kwargs) + self.metric_trigger = metric_trigger + self.scale_action = scale_action diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization.py index 3a0c733e8ef7..f4f08cb4f5ac 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization.py @@ -32,8 +32,8 @@ class SenderAuthorization(Model): 'scope': {'key': 'scope', 'type': 'str'}, } - def __init__(self, action=None, role=None, scope=None): - super(SenderAuthorization, self).__init__() - self.action = action - self.role = role - self.scope = scope + def __init__(self, **kwargs): + super(SenderAuthorization, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + self.role = kwargs.get('role', None) + self.scope = kwargs.get('scope', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization_py3.py new file mode 100644 index 000000000000..fc908dab0e93 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SenderAuthorization(Model): + """the authorization used by the user who has performed the operation that led + to this event. This captures the RBAC properties of the event. These + usually include the 'action', 'role' and the 'scope'. + + :param action: the permissible actions. For instance: + microsoft.support/supporttickets/write + :type action: str + :param role: the role of the user. For instance: Subscription Admin + :type role: str + :param scope: the scope. + :type scope: str + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'role': {'key': 'role', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + } + + def __init__(self, *, action: str=None, role: str=None, scope: str=None, **kwargs) -> None: + super(SenderAuthorization, self).__init__(**kwargs) + self.action = action + self.role = role + self.scope = scope diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver.py index 3aef994a3e0b..98c399ffde50 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver.py @@ -18,12 +18,14 @@ class SmsReceiver(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The name of the SMS receiver. Names must be unique across all - receivers within an action group. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SMS receiver. Names must be unique + across all receivers within an action group. :type name: str - :param country_code: The country code of the SMS receiver. + :param country_code: Required. The country code of the SMS receiver. :type country_code: str - :param phone_number: The phone number of the SMS receiver. + :param phone_number: Required. The phone number of the SMS receiver. :type phone_number: str :ivar status: The status of the receiver. Possible values include: 'NotSpecified', 'Enabled', 'Disabled' @@ -44,9 +46,9 @@ class SmsReceiver(Model): 'status': {'key': 'status', 'type': 'ReceiverStatus'}, } - def __init__(self, name, country_code, phone_number): - super(SmsReceiver, self).__init__() - self.name = name - self.country_code = country_code - self.phone_number = phone_number + def __init__(self, **kwargs): + super(SmsReceiver, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.country_code = kwargs.get('country_code', None) + self.phone_number = kwargs.get('phone_number', None) self.status = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver_py3.py new file mode 100644 index 000000000000..036ad0520bff --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SmsReceiver(Model): + """An SMS receiver. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SMS receiver. Names must be unique + across all receivers within an action group. + :type name: str + :param country_code: Required. The country code of the SMS receiver. + :type country_code: str + :param phone_number: Required. The phone number of the SMS receiver. + :type phone_number: str + :ivar status: The status of the receiver. Possible values include: + 'NotSpecified', 'Enabled', 'Disabled' + :vartype status: str or ~azure.mgmt.monitor.models.ReceiverStatus + """ + + _validation = { + 'name': {'required': True}, + 'country_code': {'required': True}, + 'phone_number': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, + 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ReceiverStatus'}, + } + + def __init__(self, *, name: str, country_code: str, phone_number: str, **kwargs) -> None: + super(SmsReceiver, self).__init__(**kwargs) + self.name = name + self.country_code = country_code + self.phone_number = phone_number + self.status = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition.py index c330e8cc6601..9afb3402def0 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition.py @@ -15,16 +15,18 @@ class ThresholdRuleCondition(RuleCondition): """A rule condition based on a metric crossing a threshold. + All required parameters must be populated in order to send to Azure. + :param data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. :type data_source: ~azure.mgmt.monitor.models.RuleDataSource - :param odatatype: Constant filled by server. + :param odatatype: Required. Constant filled by server. :type odatatype: str - :param operator: the operator used to compare the data and the threshold. - Possible values include: 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', - 'LessThanOrEqual' + :param operator: Required. the operator used to compare the data and the + threshold. Possible values include: 'GreaterThan', 'GreaterThanOrEqual', + 'LessThan', 'LessThanOrEqual' :type operator: str or ~azure.mgmt.monitor.models.ConditionOperator - :param threshold: the threshold value that activates the alert. + :param threshold: Required. the threshold value that activates the alert. :type threshold: float :param window_size: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified @@ -53,10 +55,10 @@ class ThresholdRuleCondition(RuleCondition): 'time_aggregation': {'key': 'timeAggregation', 'type': 'TimeAggregationOperator'}, } - def __init__(self, operator, threshold, data_source=None, window_size=None, time_aggregation=None): - super(ThresholdRuleCondition, self).__init__(data_source=data_source) - self.operator = operator - self.threshold = threshold - self.window_size = window_size - self.time_aggregation = time_aggregation + def __init__(self, **kwargs): + super(ThresholdRuleCondition, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.threshold = kwargs.get('threshold', None) + self.window_size = kwargs.get('window_size', None) + self.time_aggregation = kwargs.get('time_aggregation', None) self.odatatype = 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition_py3.py new file mode 100644 index 000000000000..e2f2340c02b0 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .rule_condition import RuleCondition + + +class ThresholdRuleCondition(RuleCondition): + """A rule condition based on a metric crossing a threshold. + + All required parameters must be populated in order to send to Azure. + + :param data_source: the resource from which the rule collects its data. + For this type dataSource will always be of type RuleMetricDataSource. + :type data_source: ~azure.mgmt.monitor.models.RuleDataSource + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param operator: Required. the operator used to compare the data and the + threshold. Possible values include: 'GreaterThan', 'GreaterThanOrEqual', + 'LessThan', 'LessThanOrEqual' + :type operator: str or ~azure.mgmt.monitor.models.ConditionOperator + :param threshold: Required. the threshold value that activates the alert. + :type threshold: float + :param window_size: the period of time (in ISO 8601 duration format) that + is used to monitor alert activity based on the threshold. If specified + then it must be between 5 minutes and 1 day. + :type window_size: timedelta + :param time_aggregation: the time aggregation operator. How the data that + are collected should be combined over time. The default value is the + PrimaryAggregationType of the Metric. Possible values include: 'Average', + 'Minimum', 'Maximum', 'Total', 'Last' + :type time_aggregation: str or + ~azure.mgmt.monitor.models.TimeAggregationOperator + """ + + _validation = { + 'odatatype': {'required': True}, + 'operator': {'required': True}, + 'threshold': {'required': True}, + } + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'ConditionOperator'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + 'time_aggregation': {'key': 'timeAggregation', 'type': 'TimeAggregationOperator'}, + } + + def __init__(self, *, operator, threshold: float, data_source=None, window_size=None, time_aggregation=None, **kwargs) -> None: + super(ThresholdRuleCondition, self).__init__(data_source=data_source, **kwargs) + self.operator = operator + self.threshold = threshold + self.window_size = window_size + self.time_aggregation = time_aggregation + self.odatatype = 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element.py index db441d8e5f54..6d7851c0962e 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element.py @@ -29,7 +29,7 @@ class TimeSeriesElement(Model): 'data': {'key': 'data', 'type': '[MetricValue]'}, } - def __init__(self, metadatavalues=None, data=None): - super(TimeSeriesElement, self).__init__() - self.metadatavalues = metadatavalues - self.data = data + def __init__(self, **kwargs): + super(TimeSeriesElement, self).__init__(**kwargs) + self.metadatavalues = kwargs.get('metadatavalues', None) + self.data = kwargs.get('data', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element_py3.py new file mode 100644 index 000000000000..98afc2d1ce05 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TimeSeriesElement(Model): + """A time series result type. The discriminator value is always TimeSeries in + this case. + + :param metadatavalues: the metadata values returned if $filter was + specified in the call. + :type metadatavalues: list[~azure.mgmt.monitor.models.MetadataValue] + :param data: An array of data points representing the metric values. This + is only returned if a result type of data is specified. + :type data: list[~azure.mgmt.monitor.models.MetricValue] + """ + + _attribute_map = { + 'metadatavalues': {'key': 'metadatavalues', 'type': '[MetadataValue]'}, + 'data': {'key': 'data', 'type': '[MetricValue]'}, + } + + def __init__(self, *, metadatavalues=None, data=None, **kwargs) -> None: + super(TimeSeriesElement, self).__init__(**kwargs) + self.metadatavalues = metadatavalues + self.data = data diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information.py index 3ccae5cc9aee..ab1e8d790d8a 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information.py @@ -15,10 +15,12 @@ class TimeSeriesInformation(Model): """The time series info needed for calculating the baseline. - :param sensitivities: the list of sensitivities for calculating the - baseline. + All required parameters must be populated in order to send to Azure. + + :param sensitivities: Required. the list of sensitivities for calculating + the baseline. :type sensitivities: list[str] - :param values: The metric values to calculate the baseline. + :param values: Required. The metric values to calculate the baseline. :type values: list[float] :param timestamps: the array of timestamps of the baselines. :type timestamps: list[datetime] @@ -35,8 +37,8 @@ class TimeSeriesInformation(Model): 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, } - def __init__(self, sensitivities, values, timestamps=None): - super(TimeSeriesInformation, self).__init__() - self.sensitivities = sensitivities - self.values = values - self.timestamps = timestamps + def __init__(self, **kwargs): + super(TimeSeriesInformation, self).__init__(**kwargs) + self.sensitivities = kwargs.get('sensitivities', None) + self.values = kwargs.get('values', None) + self.timestamps = kwargs.get('timestamps', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information_py3.py new file mode 100644 index 000000000000..1a00c52ce44a --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TimeSeriesInformation(Model): + """The time series info needed for calculating the baseline. + + All required parameters must be populated in order to send to Azure. + + :param sensitivities: Required. the list of sensitivities for calculating + the baseline. + :type sensitivities: list[str] + :param values: Required. The metric values to calculate the baseline. + :type values: list[float] + :param timestamps: the array of timestamps of the baselines. + :type timestamps: list[datetime] + """ + + _validation = { + 'sensitivities': {'required': True}, + 'values': {'required': True}, + } + + _attribute_map = { + 'sensitivities': {'key': 'sensitivities', 'type': '[str]'}, + 'values': {'key': 'values', 'type': '[float]'}, + 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, + } + + def __init__(self, *, sensitivities, values, timestamps=None, **kwargs) -> None: + super(TimeSeriesInformation, self).__init__(**kwargs) + self.sensitivities = sensitivities + self.values = values + self.timestamps = timestamps diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window.py index b0bf8c35377c..ed6ea33f45ab 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window.py @@ -15,6 +15,8 @@ class TimeWindow(Model): """A specific date-time for the profile. + All required parameters must be populated in order to send to Azure. + :param time_zone: the timezone of the start and end times for the profile. Some examples of valid timezones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time @@ -54,9 +56,9 @@ class TimeWindow(Model): Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time :type time_zone: str - :param start: the start time for the profile in ISO 8601 format. + :param start: Required. the start time for the profile in ISO 8601 format. :type start: datetime - :param end: the end time for the profile in ISO 8601 format. + :param end: Required. the end time for the profile in ISO 8601 format. :type end: datetime """ @@ -71,8 +73,8 @@ class TimeWindow(Model): 'end': {'key': 'end', 'type': 'iso-8601'}, } - def __init__(self, start, end, time_zone=None): - super(TimeWindow, self).__init__() - self.time_zone = time_zone - self.start = start - self.end = end + def __init__(self, **kwargs): + super(TimeWindow, self).__init__(**kwargs) + self.time_zone = kwargs.get('time_zone', None) + self.start = kwargs.get('start', None) + self.end = kwargs.get('end', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window_py3.py new file mode 100644 index 000000000000..196d096684a0 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TimeWindow(Model): + """A specific date-time for the profile. + + All required parameters must be populated in order to send to Azure. + + :param time_zone: the timezone of the start and end times for the profile. + Some examples of valid timezones are: Dateline Standard Time, UTC-11, + Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time + (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain + Standard Time (Mexico), Mountain Standard Time, Central America Standard + Time, Central Standard Time, Central Standard Time (Mexico), Canada + Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US + Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, + Atlantic Standard Time, Central Brazilian Standard Time, SA Western + Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. + South America Standard Time, Argentina Standard Time, SA Eastern Standard + Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard + Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde + Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich + Standard Time, W. Europe Standard Time, Central Europe Standard Time, + Romance Standard Time, Central European Standard Time, W. Central Africa + Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard + Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, + E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, + Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, + Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus + Standard Time, Russian Standard Time, E. Africa Standard Time, Iran + Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia + Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus + Standard Time, Afghanistan Standard Time, West Asia Standard Time, + Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, + Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, + Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard + Time, SE Asia Standard Time, North Asia Standard Time, China Standard + Time, North Asia East Standard Time, Singapore Standard Time, W. Australia + Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo + Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia + Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS + Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, + Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, + Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard + Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard + Time, Samoa Standard Time, Line Islands Standard Time + :type time_zone: str + :param start: Required. the start time for the profile in ISO 8601 format. + :type start: datetime + :param end: Required. the end time for the profile in ISO 8601 format. + :type end: datetime + """ + + _validation = { + 'start': {'required': True}, + 'end': {'required': True}, + } + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'start': {'key': 'start', 'type': 'iso-8601'}, + 'end': {'key': 'end', 'type': 'iso-8601'}, + } + + def __init__(self, *, start, end, time_zone: str=None, **kwargs) -> None: + super(TimeWindow, self).__init__(**kwargs) + self.time_zone = time_zone + self.start = start + self.end = end diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification.py index 5c2a1bbadffa..85dc8d60763b 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification.py @@ -26,7 +26,7 @@ class WebhookNotification(Model): 'properties': {'key': 'properties', 'type': '{str}'}, } - def __init__(self, service_uri=None, properties=None): - super(WebhookNotification, self).__init__() - self.service_uri = service_uri - self.properties = properties + def __init__(self, **kwargs): + super(WebhookNotification, self).__init__(**kwargs) + self.service_uri = kwargs.get('service_uri', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification_py3.py new file mode 100644 index 000000000000..fef993b16933 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WebhookNotification(Model): + """Webhook notification of an autoscale event. + + :param service_uri: the service address to receive the notification. + :type service_uri: str + :param properties: a property bag of settings. This value can be empty. + :type properties: dict[str, str] + """ + + _attribute_map = { + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__(self, *, service_uri: str=None, properties=None, **kwargs) -> None: + super(WebhookNotification, self).__init__(**kwargs) + self.service_uri = service_uri + self.properties = properties diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver.py index 1febd8617e14..844b87d1c71d 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver.py @@ -15,10 +15,12 @@ class WebhookReceiver(Model): """A webhook receiver. - :param name: The name of the webhook receiver. Names must be unique across - all receivers within an action group. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the webhook receiver. Names must be + unique across all receivers within an action group. :type name: str - :param service_uri: The URI where webhooks should be sent. + :param service_uri: Required. The URI where webhooks should be sent. :type service_uri: str """ @@ -32,7 +34,7 @@ class WebhookReceiver(Model): 'service_uri': {'key': 'serviceUri', 'type': 'str'}, } - def __init__(self, name, service_uri): - super(WebhookReceiver, self).__init__() - self.name = name - self.service_uri = service_uri + def __init__(self, **kwargs): + super(WebhookReceiver, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.service_uri = kwargs.get('service_uri', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver_py3.py new file mode 100644 index 000000000000..a59a4f291f5e --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WebhookReceiver(Model): + """A webhook receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the webhook receiver. Names must be + unique across all receivers within an action group. + :type name: str + :param service_uri: Required. The URI where webhooks should be sent. + :type service_uri: str + """ + + _validation = { + 'name': {'required': True}, + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + } + + def __init__(self, *, name: str, service_uri: str, **kwargs) -> None: + super(WebhookReceiver, self).__init__(**kwargs) + self.name = name + self.service_uri = service_uri diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py index 4d66d0dcb80c..0afa3bf09ab1 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py @@ -56,7 +56,7 @@ def list( :param top: The maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10. - :type top: float + :type top: int :param orderby: The aggregation to use for sorting results and the direction of the sort. Only one order can be specified. @@ -109,7 +109,7 @@ def list( if aggregation is not None: query_parameters['aggregation'] = self._serialize.query("aggregation", aggregation, 'str') if top is not None: - query_parameters['top'] = self._serialize.query("top", top, 'float') + query_parameters['top'] = self._serialize.query("top", top, 'int') if orderby is not None: query_parameters['orderby'] = self._serialize.query("orderby", orderby, 'str') if filter is not None: