diff --git a/docs/resources/kibana_maintenance_window.md b/docs/resources/kibana_maintenance_window.md new file mode 100644 index 000000000..fbe4b6ae4 --- /dev/null +++ b/docs/resources/kibana_maintenance_window.md @@ -0,0 +1,71 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "elasticstack_kibana_maintenance_window Resource - terraform-provider-elasticstack" +subcategory: "" +description: |- + Creates a Kibana Maintenance Window. +--- + +# elasticstack_kibana_maintenance_window (Resource) + +Creates a Kibana Maintenance Window. + + + + +## Schema + +### Required + +- `custom_schedule` (Block List, Min: 1, Max: 1) A set schedule over which the maintenance window applies. (see [below for nested schema](#nestedblock--custom_schedule)) +- `title` (String) The name of the maintenance window. + +### Optional + +- `enabled` (Boolean) Whether the current maintenance window is enabled. +- `scope` (Block List, Max: 1) An object that narrows the scope of what is affected by this maintenance window. (see [below for nested schema](#nestedblock--scope)) +- `space_id` (String) An identifier for the space. If space_id is not provided, the default space is used. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `custom_schedule` + +Required: + +- `duration` (String) The duration of the schedule. It allows values in `` format. `` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`. +- `start` (String) The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`. + +Optional: + +- `recurring` (Block List, Max: 1) (see [below for nested schema](#nestedblock--custom_schedule--recurring)) +- `timezone` (String) The timezone of the schedule. The default timezone is UTC. + + +### Nested Schema for `custom_schedule.recurring` + +Optional: + +- `end` (String) The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`. +- `every` (String) The interval and frequency of a recurring schedule. It allows values in `` format. `` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`. +- `on_month` (List of Number) The specific months for a recurring schedule. Valid values are 1-12. +- `on_month_day` (List of Number) The specific days of the month for a recurring schedule. Valid values are 1-31. +- `on_week_day` (List of String) The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule. + + + + +### Nested Schema for `scope` + +Optional: + +- `alerting` (Block List, Max: 1) (see [below for nested schema](#nestedblock--scope--alerting)) + + +### Nested Schema for `scope.alerting` + +Required: + +- `kql` (String) A filter written in Kibana Query Language (KQL). diff --git a/generated/alerting/.openapi-generator/FILES b/generated/alerting/.openapi-generator/FILES index 33e02dee5..907bffb57 100644 --- a/generated/alerting/.openapi-generator/FILES +++ b/generated/alerting/.openapi-generator/FILES @@ -16,6 +16,13 @@ docs/AlertResponseProperties.md docs/AlertResponsePropertiesExecutionStatus.md docs/AlertResponsePropertiesSchedule.md docs/AlertingAPI.md +docs/CreateMaintenanceWindowRequest.md +docs/CreateMaintenanceWindowRequestSchedule.md +docs/CreateMaintenanceWindowRequestScheduleCustom.md +docs/CreateMaintenanceWindowRequestScheduleCustomRecurring.md +docs/CreateMaintenanceWindowRequestScope.md +docs/CreateMaintenanceWindowRequestScopeAlerting.md +docs/CreateMaintenanceWindowRequestScopeAlertingQuery.md docs/CreateRuleRequest.md docs/FieldmapProperties.md docs/FieldmapPropertiesPropertiesValue.md @@ -54,21 +61,32 @@ docs/LegacyGetAlertingHealth200ResponseAlertingFrameworkHealthReadHealth.md docs/LegacyUpdateAlertRequestProperties.md docs/LegacyUpdateAlertRequestPropertiesActionsInner.md docs/LegacyUpdateAlertRequestPropertiesSchedule.md +docs/MaintenanceWindowResponseProperties.md +docs/MaintenanceWindowResponsePropertiesSchedule.md +docs/MaintenanceWindowResponsePropertiesScheduleCustom.md +docs/MaintenanceWindowResponsePropertiesScheduleCustomRecurring.md +docs/MaintenanceWindowResponsePropertiesScope.md +docs/MaintenanceWindowResponsePropertiesScopeAlerting.md +docs/MaintenanceWindowResponsePropertiesScopeAlertingQuery.md docs/Model400Response.md docs/Model401Response.md +docs/Model403Response.md docs/Model404Response.md docs/NotifyWhen.md +docs/NotifyWhenAction.md docs/RuleResponseProperties.md docs/RuleResponsePropertiesExecutionStatus.md docs/RuleResponsePropertiesLastRun.md docs/RuleResponsePropertiesLastRunAlertsCount.md docs/Schedule.md +docs/UpdateMaintenanceWindowRequest.md docs/UpdateRuleRequest.md git_push.sh go.mod go.sum model_400_response.go model_401_response.go +model_403_response.go model_404_response.go model_actions_inner.go model_actions_inner_alerts_filter.go @@ -80,6 +98,13 @@ model_alert_delay.go model_alert_response_properties.go model_alert_response_properties_execution_status.go model_alert_response_properties_schedule.go +model_create_maintenance_window_request.go +model_create_maintenance_window_request_schedule.go +model_create_maintenance_window_request_schedule_custom.go +model_create_maintenance_window_request_schedule_custom_recurring.go +model_create_maintenance_window_request_scope.go +model_create_maintenance_window_request_scope_alerting.go +model_create_maintenance_window_request_scope_alerting_query.go model_create_rule_request.go model_fieldmap_properties.go model_fieldmap_properties_properties_value.go @@ -118,6 +143,13 @@ model_legacy_get_alerting_health_200_response_alerting_framework_health_read_hea model_legacy_update_alert_request_properties.go model_legacy_update_alert_request_properties_actions_inner.go model_legacy_update_alert_request_properties_schedule.go +model_maintenance_window_response_properties.go +model_maintenance_window_response_properties_schedule.go +model_maintenance_window_response_properties_schedule_custom.go +model_maintenance_window_response_properties_schedule_custom_recurring.go +model_maintenance_window_response_properties_scope.go +model_maintenance_window_response_properties_scope_alerting.go +model_maintenance_window_response_properties_scope_alerting_query.go model_notify_when.go model_notify_when_action.go model_rule_response_properties.go @@ -125,6 +157,7 @@ model_rule_response_properties_execution_status.go model_rule_response_properties_last_run.go model_rule_response_properties_last_run_alerts_count.go model_schedule.go +model_update_maintenance_window_request.go model_update_rule_request.go response.go test/api_alerting_test.go diff --git a/generated/alerting/README.md b/generated/alerting/README.md index 434adaeee..8984749cc 100644 --- a/generated/alerting/README.md +++ b/generated/alerting/README.md @@ -3,8 +3,7 @@ OpenAPI schema for alerting endpoints ## Overview - -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - API version: 0.2 - Package version: 1.0.0 @@ -74,104 +73,127 @@ ctx = context.WithValue(context.Background(), alerting.ContextOperationServerVar ## Documentation for API Endpoints -All URIs are relative to _http://localhost_ - -| Class | Method | HTTP request | Description | -| ------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------- | -| _AlertingAPI_ | [**CreateRule**](docs/AlertingAPI.md#createrule) | **Post** /s/{spaceId}/api/alerting/rule | Creates a rule with a randomly generated rule identifier. | -| _AlertingAPI_ | [**CreateRuleId**](docs/AlertingAPI.md#createruleid) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId} | Creates a rule with a specific rule identifier. | -| _AlertingAPI_ | [**DeleteRule**](docs/AlertingAPI.md#deleterule) | **Delete** /s/{spaceId}/api/alerting/rule/{ruleId} | Deletes a rule. | -| _AlertingAPI_ | [**DisableRule**](docs/AlertingAPI.md#disablerule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/\_disable | Disables a rule. | -| _AlertingAPI_ | [**EnableRule**](docs/AlertingAPI.md#enablerule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/\_enable | Enables a rule. | -| _AlertingAPI_ | [**FindRules**](docs/AlertingAPI.md#findrules) | **Get** /s/{spaceId}/api/alerting/rules/\_find | Retrieves information about rules. | -| _AlertingAPI_ | [**GetAlertingHealth**](docs/AlertingAPI.md#getalertinghealth) | **Get** /s/{spaceId}/api/alerting/\_health | Retrieves the health status of the alerting framework. | -| _AlertingAPI_ | [**GetRule**](docs/AlertingAPI.md#getrule) | **Get** /s/{spaceId}/api/alerting/rule/{ruleId} | Retrieves a rule by its identifier. | -| _AlertingAPI_ | [**GetRuleTypes**](docs/AlertingAPI.md#getruletypes) | **Get** /s/{spaceId}/api/alerting/rule_types | Retrieves a list of rule types. | -| _AlertingAPI_ | [**LegacyCreateAlert**](docs/AlertingAPI.md#legacycreatealert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId} | Create an alert. | -| _AlertingAPI_ | [**LegacyDisableAlert**](docs/AlertingAPI.md#legacydisablealert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/\_disable | Disables an alert. | -| _AlertingAPI_ | [**LegacyEnableAlert**](docs/AlertingAPI.md#legacyenablealert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/\_enable | Enables an alert. | -| _AlertingAPI_ | [**LegacyFindAlerts**](docs/AlertingAPI.md#legacyfindalerts) | **Get** /s/{spaceId}/api/alerts/alerts/\_find | Retrieves a paginated set of alerts. | -| _AlertingAPI_ | [**LegacyGetAlert**](docs/AlertingAPI.md#legacygetalert) | **Get** /s/{spaceId}/api/alerts/alert/{alertId} | Retrieves an alert by its identifier. | -| _AlertingAPI_ | [**LegacyGetAlertTypes**](docs/AlertingAPI.md#legacygetalerttypes) | **Get** /s/{spaceId}/api/alerts/alerts/list_alert_types | Retrieves a list of alert types. | -| _AlertingAPI_ | [**LegacyGetAlertingHealth**](docs/AlertingAPI.md#legacygetalertinghealth) | **Get** /s/{spaceId}/api/alerts/alerts/\_health | Retrieves the health status of the alerting framework. | -| _AlertingAPI_ | [**LegacyMuteAlertInstance**](docs/AlertingAPI.md#legacymutealertinstance) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/\_mute | Mutes an alert instance. | -| _AlertingAPI_ | [**LegacyMuteAllAlertInstances**](docs/AlertingAPI.md#legacymuteallalertinstances) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/\_mute_all | Mutes all alert instances. | -| _AlertingAPI_ | [**LegacyUnmuteAlertInstance**](docs/AlertingAPI.md#legacyunmutealertinstance) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/\_unmute | Unmutes an alert instance. | -| _AlertingAPI_ | [**LegacyUnmuteAllAlertInstances**](docs/AlertingAPI.md#legacyunmuteallalertinstances) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/\_unmute_all | Unmutes all alert instances. | -| _AlertingAPI_ | [**LegacyUpdateAlert**](docs/AlertingAPI.md#legacyupdatealert) | **Put** /s/{spaceId}/api/alerts/alert/{alertId} | Updates the attributes for an alert. | -| _AlertingAPI_ | [**LegaryDeleteAlert**](docs/AlertingAPI.md#legarydeletealert) | **Delete** /s/{spaceId}/api/alerts/alert/{alertId} | Permanently removes an alert. | -| _AlertingAPI_ | [**MuteAlert**](docs/AlertingAPI.md#mutealert) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/\_mute | Mutes an alert. | -| _AlertingAPI_ | [**MuteAllAlerts**](docs/AlertingAPI.md#muteallalerts) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/\_mute_all | Mutes all alerts. | -| _AlertingAPI_ | [**UnmuteAlert**](docs/AlertingAPI.md#unmutealert) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/\_unmute | Unmutes an alert. | -| _AlertingAPI_ | [**UnmuteAllAlerts**](docs/AlertingAPI.md#unmuteallalerts) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/\_unmute_all | Unmutes all alerts. | -| _AlertingAPI_ | [**UpdateRule**](docs/AlertingAPI.md#updaterule) | **Put** /s/{spaceId}/api/alerting/rule/{ruleId} | Updates the attributes for a rule. | -| _AlertingAPI_ | [**UpdateRuleAPIKey**](docs/AlertingAPI.md#updateruleapikey) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/\_update_api_key | Updates the API key for a rule. | +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AlertingAPI* | [**CreateMaintenanceWindow**](docs/AlertingAPI.md#createmaintenancewindow) | **Post** /s/{spaceId}/api/maintenance_window | Create a maintenance window. +*AlertingAPI* | [**CreateRule**](docs/AlertingAPI.md#createrule) | **Post** /s/{spaceId}/api/alerting/rule | Creates a rule with a randomly generated rule identifier. +*AlertingAPI* | [**CreateRuleId**](docs/AlertingAPI.md#createruleid) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId} | Creates a rule with a specific rule identifier. +*AlertingAPI* | [**DeleteMaintenanceWindow**](docs/AlertingAPI.md#deletemaintenancewindow) | **Delete** /s/{spaceId}/api/maintenance_window/{maintenanceWindowId} | Delete a maintenance window +*AlertingAPI* | [**DeleteRule**](docs/AlertingAPI.md#deleterule) | **Delete** /s/{spaceId}/api/alerting/rule/{ruleId} | Deletes a rule. +*AlertingAPI* | [**DisableRule**](docs/AlertingAPI.md#disablerule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_disable | Disables a rule. +*AlertingAPI* | [**EnableRule**](docs/AlertingAPI.md#enablerule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_enable | Enables a rule. +*AlertingAPI* | [**FindRules**](docs/AlertingAPI.md#findrules) | **Get** /s/{spaceId}/api/alerting/rules/_find | Retrieves information about rules. +*AlertingAPI* | [**GetAlertingHealth**](docs/AlertingAPI.md#getalertinghealth) | **Get** /s/{spaceId}/api/alerting/_health | Retrieves the health status of the alerting framework. +*AlertingAPI* | [**GetMaintenanceWindow**](docs/AlertingAPI.md#getmaintenancewindow) | **Get** /s/{spaceId}/api/maintenance_window/{maintenanceWindowId} | Get a maintenance window +*AlertingAPI* | [**GetRule**](docs/AlertingAPI.md#getrule) | **Get** /s/{spaceId}/api/alerting/rule/{ruleId} | Retrieves a rule by its identifier. +*AlertingAPI* | [**GetRuleTypes**](docs/AlertingAPI.md#getruletypes) | **Get** /s/{spaceId}/api/alerting/rule_types | Retrieves a list of rule types. +*AlertingAPI* | [**LegacyCreateAlert**](docs/AlertingAPI.md#legacycreatealert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId} | Create an alert. +*AlertingAPI* | [**LegacyDisableAlert**](docs/AlertingAPI.md#legacydisablealert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_disable | Disables an alert. +*AlertingAPI* | [**LegacyEnableAlert**](docs/AlertingAPI.md#legacyenablealert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_enable | Enables an alert. +*AlertingAPI* | [**LegacyFindAlerts**](docs/AlertingAPI.md#legacyfindalerts) | **Get** /s/{spaceId}/api/alerts/alerts/_find | Retrieves a paginated set of alerts. +*AlertingAPI* | [**LegacyGetAlert**](docs/AlertingAPI.md#legacygetalert) | **Get** /s/{spaceId}/api/alerts/alert/{alertId} | Retrieves an alert by its identifier. +*AlertingAPI* | [**LegacyGetAlertTypes**](docs/AlertingAPI.md#legacygetalerttypes) | **Get** /s/{spaceId}/api/alerts/alerts/list_alert_types | Retrieves a list of alert types. +*AlertingAPI* | [**LegacyGetAlertingHealth**](docs/AlertingAPI.md#legacygetalertinghealth) | **Get** /s/{spaceId}/api/alerts/alerts/_health | Retrieves the health status of the alerting framework. +*AlertingAPI* | [**LegacyMuteAlertInstance**](docs/AlertingAPI.md#legacymutealertinstance) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_mute | Mutes an alert instance. +*AlertingAPI* | [**LegacyMuteAllAlertInstances**](docs/AlertingAPI.md#legacymuteallalertinstances) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_mute_all | Mutes all alert instances. +*AlertingAPI* | [**LegacyUnmuteAlertInstance**](docs/AlertingAPI.md#legacyunmutealertinstance) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute | Unmutes an alert instance. +*AlertingAPI* | [**LegacyUnmuteAllAlertInstances**](docs/AlertingAPI.md#legacyunmuteallalertinstances) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_unmute_all | Unmutes all alert instances. +*AlertingAPI* | [**LegacyUpdateAlert**](docs/AlertingAPI.md#legacyupdatealert) | **Put** /s/{spaceId}/api/alerts/alert/{alertId} | Updates the attributes for an alert. +*AlertingAPI* | [**LegaryDeleteAlert**](docs/AlertingAPI.md#legarydeletealert) | **Delete** /s/{spaceId}/api/alerts/alert/{alertId} | Permanently removes an alert. +*AlertingAPI* | [**MuteAlert**](docs/AlertingAPI.md#mutealert) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_mute | Mutes an alert. +*AlertingAPI* | [**MuteAllAlerts**](docs/AlertingAPI.md#muteallalerts) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_mute_all | Mutes all alerts. +*AlertingAPI* | [**UnmuteAlert**](docs/AlertingAPI.md#unmutealert) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute | Unmutes an alert. +*AlertingAPI* | [**UnmuteAllAlerts**](docs/AlertingAPI.md#unmuteallalerts) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_unmute_all | Unmutes all alerts. +*AlertingAPI* | [**UpdateMaintenanceWindow**](docs/AlertingAPI.md#updatemaintenancewindow) | **Patch** /s/{spaceId}/api/maintenance_window/{maintenanceWindowId} | Update a maintenance window. +*AlertingAPI* | [**UpdateRule**](docs/AlertingAPI.md#updaterule) | **Put** /s/{spaceId}/api/alerting/rule/{ruleId} | Updates the attributes for a rule. +*AlertingAPI* | [**UpdateRuleAPIKey**](docs/AlertingAPI.md#updateruleapikey) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_update_api_key | Updates the API key for a rule. + ## Documentation For Models -- [ActionsInner](docs/ActionsInner.md) -- [ActionsInnerAlertsFilter](docs/ActionsInnerAlertsFilter.md) -- [ActionsInnerAlertsFilterQuery](docs/ActionsInnerAlertsFilterQuery.md) -- [ActionsInnerAlertsFilterTimeframe](docs/ActionsInnerAlertsFilterTimeframe.md) -- [ActionsInnerAlertsFilterTimeframeHours](docs/ActionsInnerAlertsFilterTimeframeHours.md) -- [ActionsInnerFrequency](docs/ActionsInnerFrequency.md) -- [AlertDelay](docs/AlertDelay.md) -- [AlertResponseProperties](docs/AlertResponseProperties.md) -- [AlertResponsePropertiesExecutionStatus](docs/AlertResponsePropertiesExecutionStatus.md) -- [AlertResponsePropertiesSchedule](docs/AlertResponsePropertiesSchedule.md) -- [CreateRuleRequest](docs/CreateRuleRequest.md) -- [FieldmapProperties](docs/FieldmapProperties.md) -- [FieldmapPropertiesPropertiesValue](docs/FieldmapPropertiesPropertiesValue.md) -- [Filter](docs/Filter.md) -- [FilterMeta](docs/FilterMeta.md) -- [FindRules200Response](docs/FindRules200Response.md) -- [FindRulesHasReferenceParameter](docs/FindRulesHasReferenceParameter.md) -- [GetAlertingHealth200Response](docs/GetAlertingHealth200Response.md) -- [GetAlertingHealth200ResponseAlertingFrameworkHealth](docs/GetAlertingHealth200ResponseAlertingFrameworkHealth.md) -- [GetAlertingHealth200ResponseAlertingFrameworkHealthDecryptionHealth](docs/GetAlertingHealth200ResponseAlertingFrameworkHealthDecryptionHealth.md) -- [GetAlertingHealth200ResponseAlertingFrameworkHealthExecutionHealth](docs/GetAlertingHealth200ResponseAlertingFrameworkHealthExecutionHealth.md) -- [GetAlertingHealth200ResponseAlertingFrameworkHealthReadHealth](docs/GetAlertingHealth200ResponseAlertingFrameworkHealthReadHealth.md) -- [GetRuleTypes200ResponseInner](docs/GetRuleTypes200ResponseInner.md) -- [GetRuleTypes200ResponseInnerActionGroupsInner](docs/GetRuleTypes200ResponseInnerActionGroupsInner.md) -- [GetRuleTypes200ResponseInnerActionVariables](docs/GetRuleTypes200ResponseInnerActionVariables.md) -- [GetRuleTypes200ResponseInnerActionVariablesContextInner](docs/GetRuleTypes200ResponseInnerActionVariablesContextInner.md) -- [GetRuleTypes200ResponseInnerActionVariablesParamsInner](docs/GetRuleTypes200ResponseInnerActionVariablesParamsInner.md) -- [GetRuleTypes200ResponseInnerActionVariablesStateInner](docs/GetRuleTypes200ResponseInnerActionVariablesStateInner.md) -- [GetRuleTypes200ResponseInnerAlerts](docs/GetRuleTypes200ResponseInnerAlerts.md) -- [GetRuleTypes200ResponseInnerAlertsMappings](docs/GetRuleTypes200ResponseInnerAlertsMappings.md) -- [GetRuleTypes200ResponseInnerAuthorizedConsumers](docs/GetRuleTypes200ResponseInnerAuthorizedConsumers.md) -- [GetRuleTypes200ResponseInnerAuthorizedConsumersAlerts](docs/GetRuleTypes200ResponseInnerAuthorizedConsumersAlerts.md) -- [GetRuleTypes200ResponseInnerRecoveryActionGroup](docs/GetRuleTypes200ResponseInnerRecoveryActionGroup.md) -- [LegacyCreateAlertRequestProperties](docs/LegacyCreateAlertRequestProperties.md) -- [LegacyFindAlerts200Response](docs/LegacyFindAlerts200Response.md) -- [LegacyFindAlertsHasReferenceParameter](docs/LegacyFindAlertsHasReferenceParameter.md) -- [LegacyGetAlertTypes200ResponseInner](docs/LegacyGetAlertTypes200ResponseInner.md) -- [LegacyGetAlertTypes200ResponseInnerActionGroupsInner](docs/LegacyGetAlertTypes200ResponseInnerActionGroupsInner.md) -- [LegacyGetAlertTypes200ResponseInnerActionVariables](docs/LegacyGetAlertTypes200ResponseInnerActionVariables.md) -- [LegacyGetAlertTypes200ResponseInnerRecoveryActionGroup](docs/LegacyGetAlertTypes200ResponseInnerRecoveryActionGroup.md) -- [LegacyGetAlertingHealth200Response](docs/LegacyGetAlertingHealth200Response.md) -- [LegacyGetAlertingHealth200ResponseAlertingFrameworkHealth](docs/LegacyGetAlertingHealth200ResponseAlertingFrameworkHealth.md) -- [LegacyGetAlertingHealth200ResponseAlertingFrameworkHealthDecryptionHealth](docs/LegacyGetAlertingHealth200ResponseAlertingFrameworkHealthDecryptionHealth.md) -- [LegacyGetAlertingHealth200ResponseAlertingFrameworkHealthExecutionHealth](docs/LegacyGetAlertingHealth200ResponseAlertingFrameworkHealthExecutionHealth.md) -- [LegacyGetAlertingHealth200ResponseAlertingFrameworkHealthReadHealth](docs/LegacyGetAlertingHealth200ResponseAlertingFrameworkHealthReadHealth.md) -- [LegacyUpdateAlertRequestProperties](docs/LegacyUpdateAlertRequestProperties.md) -- [LegacyUpdateAlertRequestPropertiesActionsInner](docs/LegacyUpdateAlertRequestPropertiesActionsInner.md) -- [LegacyUpdateAlertRequestPropertiesSchedule](docs/LegacyUpdateAlertRequestPropertiesSchedule.md) -- [Model400Response](docs/Model400Response.md) -- [Model401Response](docs/Model401Response.md) -- [Model404Response](docs/Model404Response.md) -- [NotifyWhen](docs/NotifyWhen.md) -- [RuleResponseProperties](docs/RuleResponseProperties.md) -- [RuleResponsePropertiesExecutionStatus](docs/RuleResponsePropertiesExecutionStatus.md) -- [RuleResponsePropertiesLastRun](docs/RuleResponsePropertiesLastRun.md) -- [RuleResponsePropertiesLastRunAlertsCount](docs/RuleResponsePropertiesLastRunAlertsCount.md) -- [Schedule](docs/Schedule.md) -- [UpdateRuleRequest](docs/UpdateRuleRequest.md) + - [ActionsInner](docs/ActionsInner.md) + - [ActionsInnerAlertsFilter](docs/ActionsInnerAlertsFilter.md) + - [ActionsInnerAlertsFilterQuery](docs/ActionsInnerAlertsFilterQuery.md) + - [ActionsInnerAlertsFilterTimeframe](docs/ActionsInnerAlertsFilterTimeframe.md) + - [ActionsInnerAlertsFilterTimeframeHours](docs/ActionsInnerAlertsFilterTimeframeHours.md) + - [ActionsInnerFrequency](docs/ActionsInnerFrequency.md) + - [AlertDelay](docs/AlertDelay.md) + - [AlertResponseProperties](docs/AlertResponseProperties.md) + - [AlertResponsePropertiesExecutionStatus](docs/AlertResponsePropertiesExecutionStatus.md) + - [AlertResponsePropertiesSchedule](docs/AlertResponsePropertiesSchedule.md) + - [CreateMaintenanceWindowRequest](docs/CreateMaintenanceWindowRequest.md) + - [CreateMaintenanceWindowRequestSchedule](docs/CreateMaintenanceWindowRequestSchedule.md) + - [CreateMaintenanceWindowRequestScheduleCustom](docs/CreateMaintenanceWindowRequestScheduleCustom.md) + - [CreateMaintenanceWindowRequestScheduleCustomRecurring](docs/CreateMaintenanceWindowRequestScheduleCustomRecurring.md) + - [CreateMaintenanceWindowRequestScope](docs/CreateMaintenanceWindowRequestScope.md) + - [CreateMaintenanceWindowRequestScopeAlerting](docs/CreateMaintenanceWindowRequestScopeAlerting.md) + - [CreateMaintenanceWindowRequestScopeAlertingQuery](docs/CreateMaintenanceWindowRequestScopeAlertingQuery.md) + - [CreateRuleRequest](docs/CreateRuleRequest.md) + - [FieldmapProperties](docs/FieldmapProperties.md) + - [FieldmapPropertiesPropertiesValue](docs/FieldmapPropertiesPropertiesValue.md) + - [Filter](docs/Filter.md) + - [FilterMeta](docs/FilterMeta.md) + - [FindRules200Response](docs/FindRules200Response.md) + - [FindRulesHasReferenceParameter](docs/FindRulesHasReferenceParameter.md) + - [GetAlertingHealth200Response](docs/GetAlertingHealth200Response.md) + - [GetAlertingHealth200ResponseAlertingFrameworkHealth](docs/GetAlertingHealth200ResponseAlertingFrameworkHealth.md) + - [GetAlertingHealth200ResponseAlertingFrameworkHealthDecryptionHealth](docs/GetAlertingHealth200ResponseAlertingFrameworkHealthDecryptionHealth.md) + - [GetAlertingHealth200ResponseAlertingFrameworkHealthExecutionHealth](docs/GetAlertingHealth200ResponseAlertingFrameworkHealthExecutionHealth.md) + - [GetAlertingHealth200ResponseAlertingFrameworkHealthReadHealth](docs/GetAlertingHealth200ResponseAlertingFrameworkHealthReadHealth.md) + - [GetRuleTypes200ResponseInner](docs/GetRuleTypes200ResponseInner.md) + - [GetRuleTypes200ResponseInnerActionGroupsInner](docs/GetRuleTypes200ResponseInnerActionGroupsInner.md) + - [GetRuleTypes200ResponseInnerActionVariables](docs/GetRuleTypes200ResponseInnerActionVariables.md) + - [GetRuleTypes200ResponseInnerActionVariablesContextInner](docs/GetRuleTypes200ResponseInnerActionVariablesContextInner.md) + - [GetRuleTypes200ResponseInnerActionVariablesParamsInner](docs/GetRuleTypes200ResponseInnerActionVariablesParamsInner.md) + - [GetRuleTypes200ResponseInnerActionVariablesStateInner](docs/GetRuleTypes200ResponseInnerActionVariablesStateInner.md) + - [GetRuleTypes200ResponseInnerAlerts](docs/GetRuleTypes200ResponseInnerAlerts.md) + - [GetRuleTypes200ResponseInnerAlertsMappings](docs/GetRuleTypes200ResponseInnerAlertsMappings.md) + - [GetRuleTypes200ResponseInnerAuthorizedConsumers](docs/GetRuleTypes200ResponseInnerAuthorizedConsumers.md) + - [GetRuleTypes200ResponseInnerAuthorizedConsumersAlerts](docs/GetRuleTypes200ResponseInnerAuthorizedConsumersAlerts.md) + - [GetRuleTypes200ResponseInnerRecoveryActionGroup](docs/GetRuleTypes200ResponseInnerRecoveryActionGroup.md) + - [LegacyCreateAlertRequestProperties](docs/LegacyCreateAlertRequestProperties.md) + - [LegacyFindAlerts200Response](docs/LegacyFindAlerts200Response.md) + - [LegacyFindAlertsHasReferenceParameter](docs/LegacyFindAlertsHasReferenceParameter.md) + - [LegacyGetAlertTypes200ResponseInner](docs/LegacyGetAlertTypes200ResponseInner.md) + - [LegacyGetAlertTypes200ResponseInnerActionGroupsInner](docs/LegacyGetAlertTypes200ResponseInnerActionGroupsInner.md) + - [LegacyGetAlertTypes200ResponseInnerActionVariables](docs/LegacyGetAlertTypes200ResponseInnerActionVariables.md) + - [LegacyGetAlertTypes200ResponseInnerRecoveryActionGroup](docs/LegacyGetAlertTypes200ResponseInnerRecoveryActionGroup.md) + - [LegacyGetAlertingHealth200Response](docs/LegacyGetAlertingHealth200Response.md) + - [LegacyGetAlertingHealth200ResponseAlertingFrameworkHealth](docs/LegacyGetAlertingHealth200ResponseAlertingFrameworkHealth.md) + - [LegacyGetAlertingHealth200ResponseAlertingFrameworkHealthDecryptionHealth](docs/LegacyGetAlertingHealth200ResponseAlertingFrameworkHealthDecryptionHealth.md) + - [LegacyGetAlertingHealth200ResponseAlertingFrameworkHealthExecutionHealth](docs/LegacyGetAlertingHealth200ResponseAlertingFrameworkHealthExecutionHealth.md) + - [LegacyGetAlertingHealth200ResponseAlertingFrameworkHealthReadHealth](docs/LegacyGetAlertingHealth200ResponseAlertingFrameworkHealthReadHealth.md) + - [LegacyUpdateAlertRequestProperties](docs/LegacyUpdateAlertRequestProperties.md) + - [LegacyUpdateAlertRequestPropertiesActionsInner](docs/LegacyUpdateAlertRequestPropertiesActionsInner.md) + - [LegacyUpdateAlertRequestPropertiesSchedule](docs/LegacyUpdateAlertRequestPropertiesSchedule.md) + - [MaintenanceWindowResponseProperties](docs/MaintenanceWindowResponseProperties.md) + - [MaintenanceWindowResponsePropertiesSchedule](docs/MaintenanceWindowResponsePropertiesSchedule.md) + - [MaintenanceWindowResponsePropertiesScheduleCustom](docs/MaintenanceWindowResponsePropertiesScheduleCustom.md) + - [MaintenanceWindowResponsePropertiesScheduleCustomRecurring](docs/MaintenanceWindowResponsePropertiesScheduleCustomRecurring.md) + - [MaintenanceWindowResponsePropertiesScope](docs/MaintenanceWindowResponsePropertiesScope.md) + - [MaintenanceWindowResponsePropertiesScopeAlerting](docs/MaintenanceWindowResponsePropertiesScopeAlerting.md) + - [MaintenanceWindowResponsePropertiesScopeAlertingQuery](docs/MaintenanceWindowResponsePropertiesScopeAlertingQuery.md) + - [Model400Response](docs/Model400Response.md) + - [Model401Response](docs/Model401Response.md) + - [Model403Response](docs/Model403Response.md) + - [Model404Response](docs/Model404Response.md) + - [NotifyWhen](docs/NotifyWhen.md) + - [NotifyWhenAction](docs/NotifyWhenAction.md) + - [RuleResponseProperties](docs/RuleResponseProperties.md) + - [RuleResponsePropertiesExecutionStatus](docs/RuleResponsePropertiesExecutionStatus.md) + - [RuleResponsePropertiesLastRun](docs/RuleResponsePropertiesLastRun.md) + - [RuleResponsePropertiesLastRunAlertsCount](docs/RuleResponsePropertiesLastRunAlertsCount.md) + - [Schedule](docs/Schedule.md) + - [UpdateMaintenanceWindowRequest](docs/UpdateMaintenanceWindowRequest.md) + - [UpdateRuleRequest](docs/UpdateRuleRequest.md) + ## Documentation For Authorization -Authentication schemes defined for the API: +Authentication schemes defined for the API: ### basicAuth - **Type**: HTTP basic authentication @@ -207,20 +229,24 @@ auth := context.WithValue( r, err := client.Service.Operation(auth, args) ``` + ## Documentation for Utility Methods Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it: -- `PtrBool` -- `PtrInt` -- `PtrInt32` -- `PtrInt64` -- `PtrFloat` -- `PtrFloat32` -- `PtrFloat64` -- `PtrString` -- `PtrTime` +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` ## Author + + + diff --git a/generated/alerting/api/openapi.yaml b/generated/alerting/api/openapi.yaml index 81becda9d..82005c0f1 100644 --- a/generated/alerting/api/openapi.yaml +++ b/generated/alerting/api/openapi.yaml @@ -1065,6 +1065,105 @@ paths: summary: Unmutes an alert instance. tags: - alerting + /s/{spaceId}/api/maintenance_window: + post: + description: "[Required authorization] Route required privileges: ALL of [write-maintenance-window]." + operationId: createMaintenanceWindow + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/space_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/create_maintenance_window_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/maintenance_window_response_properties' + description: Indicates a successful call. + "400": + description: Indicates an invalid schema or parameters. + "403": + description: Indicates that this call is forbidden. + summary: Create a maintenance window. + tags: + - alerting + /s/{spaceId}/api/maintenance_window/{maintenanceWindowId}: + delete: + description: "Delete a maintenance window by ID.

[Required authorization]\ + \ Route required privileges: ALL of [write-maintenance-window]." + operationId: deleteMaintenanceWindow + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/maintenance_window_id' + - $ref: '#/components/parameters/space_id' + responses: + "204": + description: Indicates a successful call. + "400": + description: Indicates an invalid schema or parameters. + "403": + description: Indicates that this call is forbidden. + "404": + description: Indicates a maintenance window with the given ID does not exist. + summary: Delete a maintenance window + tags: + - alerting + get: + description: "Get a maintenance window by ID.

[Required authorization]\ + \ Route required privileges: ALL of [read-maintenance-window]." + operationId: getMaintenanceWindow + parameters: + - $ref: '#/components/parameters/maintenance_window_id' + - $ref: '#/components/parameters/space_id' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/maintenance_window_response_properties' + description: Indicates a successful call. + "403": + description: Indicates that this call is forbidden. + "404": + description: Indicates a maintenance window with the given ID does not exist. + summary: Get a maintenance window + tags: + - alerting + patch: + description: "[Required authorization] Route required privileges: ALL of [write-maintenance-window]." + operationId: updateMaintenanceWindow + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/maintenance_window_id' + - $ref: '#/components/parameters/space_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/update_maintenance_window_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/maintenance_window_response_properties' + description: Indicates a successful call. + "400": + description: Indicates an invalid schema or parameters. + "403": + description: Indicates that this call is forbidden. + "404": + description: Indicates a maintenance window with the given ID does not exist. + "409": + description: Indicates that the maintenance window has already been updated + by another user. + summary: Update a maintenance window. + tags: + - alerting components: examples: create_es_query_esql_rule_request: @@ -2148,6 +2247,15 @@ components: required: true schema: {} style: simple + maintenance_window_id: + description: An identifier for the maintenance window. + explode: false + in: path + name: maintenanceWindowId + required: true + schema: + example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + style: simple schemas: filter: description: A filter written in Elasticsearch Query Domain Specific Language @@ -2652,10 +2760,8 @@ components: description: Indicates whether the field is required. type: boolean scaling_factor: - description: "The scaling factor to use when encoding values. This property\ - \ is applicable when `type` is `scaled_float`. Values will be multiplied\ - \ by this factor at index time and rounded to the closest long value.\ - \ \n" + description: | + The scaling factor to use when encoding values. This property is applicable when `type` is `scaled_float`. Values will be multiplied by this factor at index time and rounded to the closest long value. type: integer type: description: Specifies the data type for the field. @@ -2767,6 +2873,134 @@ components: nullable: true type: string title: Legacy alert response properties + create_maintenance_window_request: + properties: + enabled: + description: Whether the current maintenance window is enabled. Disabled + maintenance windows do not suppress notifications. + type: boolean + schedule: + $ref: '#/components/schemas/create_maintenance_window_request_schedule' + scope: + $ref: '#/components/schemas/create_maintenance_window_request_scope' + title: + description: "The name of the maintenance window. While this name does not\ + \ have to be unique, a distinctive name can help you identify a specific\ + \ maintenance window." + type: string + required: + - schedule + - title + title: Create maintenance window request + update_maintenance_window_request: + properties: + enabled: + description: Whether the current maintenance window is enabled. Disabled + maintenance windows do not suppress notifications. + type: boolean + schedule: + $ref: '#/components/schemas/create_maintenance_window_request_schedule' + scope: + $ref: '#/components/schemas/create_maintenance_window_request_scope' + title: + description: "The name of the maintenance window. While this name does not\ + \ have to be unique, a distinctive name can help you identify a specific\ + \ maintenance window." + type: string + maintenance_window_response_properties: + example: + schedule: + custom: + duration: duration + recurring: + occurrences: 1.0800828190461012 + onMonth: + - 7.630201801377444 + - 7.630201801377444 + end: end + onWeekDay: + - onWeekDay + - onWeekDay + every: every + onMonthDay: + - 5.3974389415088355 + - 5.3974389415088355 + timezone: timezone + start: start + updated_at: updated_at + scope: + alerting: + query: + kql: kql + updated_by: updated_by + created_at: created_at + id: id + title: title + created_by: created_by + enabled: true + status: running + properties: + created_at: + description: The date and time when the maintenance window was created. + type: string + created_by: + description: The identifier for the user that created the maintenance window. + type: string + nullable: true + enabled: + description: Whether the current maintenance window is enabled. Disabled + maintenance windows do not suppress notifications. + type: boolean + id: + description: The identifier for the maintenance window. + type: string + schedule: + $ref: '#/components/schemas/maintenance_window_response_properties_schedule' + scope: + $ref: '#/components/schemas/maintenance_window_response_properties_scope' + status: + description: The current status of the maintenance window. + enum: + - running + - upcoming + - finished + - archived + type: string + title: + description: The name of the maintenance window. + type: string + updated_at: + description: The date and time when the maintenance window was last updated. + type: string + updated_by: + description: The identifier for the user that last updated this maintenance + window. + type: string + nullable: true + required: + - created_at + - created_by + - enabled + - id + - schedule + - status + - title + - updated_at + - updated_by + title: Maintenance Window response properties + "403_response": + properties: + statusCode: + description: Error status code + example: 403 + type: number + error: + description: Error type + example: Forbidden + type: string + message: + description: Error message + type: string findRules_has_reference_parameter: properties: id: @@ -4350,6 +4584,221 @@ components: properties: interval: type: string + create_maintenance_window_request_schedule_custom_recurring: + properties: + end: + description: "The end date of a recurring schedule, provided in ISO 8601\ + \ format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`." + type: string + every: + description: "The interval and frequency of a recurring schedule. It allows\ + \ values in `` format. `` is one of `d`, `w`, `M`,\ + \ or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`,\ + \ `1y`." + type: string + occurrences: + description: The total number of recurrences of the schedule. + minimum: 1 + type: number + onMonth: + items: + maximum: 12 + minimum: 1 + type: number + type: array + onMonthDay: + items: + maximum: 31 + minimum: 1 + type: number + type: array + onWeekDay: + items: + type: string + type: array + create_maintenance_window_request_schedule_custom: + properties: + duration: + description: "The duration of the schedule. It allows values in ``\ + \ format. `` is one of `d`, `h`, `m`, or `s` for hours, minutes,\ + \ seconds. For example: `1d`, `5h`, `30m`, `5000s`." + type: string + recurring: + $ref: '#/components/schemas/create_maintenance_window_request_schedule_custom_recurring' + start: + description: "The start date and time of the schedule, provided in ISO 8601\ + \ format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`." + type: string + timezone: + description: The timezone of the schedule. The default timezone is UTC. + type: string + required: + - duration + - start + create_maintenance_window_request_schedule: + properties: + custom: + $ref: '#/components/schemas/create_maintenance_window_request_schedule_custom' + required: + - custom + create_maintenance_window_request_scope_alerting_query: + properties: + kql: + description: A filter written in Kibana Query Language (KQL). + type: string + required: + - kql + create_maintenance_window_request_scope_alerting: + properties: + query: + $ref: '#/components/schemas/create_maintenance_window_request_scope_alerting_query' + required: + - query + create_maintenance_window_request_scope: + properties: + alerting: + $ref: '#/components/schemas/create_maintenance_window_request_scope_alerting' + required: + - alerting + maintenance_window_response_properties_schedule_custom_recurring: + additionalProperties: true + example: + occurrences: 1.0800828190461012 + onMonth: + - 7.630201801377444 + - 7.630201801377444 + end: end + onWeekDay: + - onWeekDay + - onWeekDay + every: every + onMonthDay: + - 5.3974389415088355 + - 5.3974389415088355 + properties: + end: + description: "The end date of a recurring schedule, provided in ISO 8601\ + \ format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`." + type: string + every: + description: "The interval and frequency of a recurring schedule. It allows\ + \ values in `` format. `` is one of `d`, `w`, `M`,\ + \ or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`,\ + \ `1y`." + type: string + occurrences: + description: The total number of recurrences of the schedule. + minimum: 1 + type: number + onMonth: + items: + maximum: 12 + minimum: 1 + type: number + type: array + onMonthDay: + items: + maximum: 31 + minimum: 1 + type: number + type: array + onWeekDay: + items: + type: string + type: array + maintenance_window_response_properties_schedule_custom: + additionalProperties: true + example: + duration: duration + recurring: + occurrences: 1.0800828190461012 + onMonth: + - 7.630201801377444 + - 7.630201801377444 + end: end + onWeekDay: + - onWeekDay + - onWeekDay + every: every + onMonthDay: + - 5.3974389415088355 + - 5.3974389415088355 + timezone: timezone + start: start + properties: + duration: + description: "The duration of the schedule. It allows values in ``\ + \ format. `` is one of `d`, `h`, `m`, or `s` for hours, minutes,\ + \ seconds. For example: `1d`, `5h`, `30m`, `5000s`." + type: string + recurring: + $ref: '#/components/schemas/maintenance_window_response_properties_schedule_custom_recurring' + start: + description: "The start date and time of the schedule, provided in ISO 8601\ + \ format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`." + type: string + timezone: + description: The timezone of the schedule. The default timezone is UTC. + type: string + required: + - duration + - start + maintenance_window_response_properties_schedule: + additionalProperties: true + example: + custom: + duration: duration + recurring: + occurrences: 1.0800828190461012 + onMonth: + - 7.630201801377444 + - 7.630201801377444 + end: end + onWeekDay: + - onWeekDay + - onWeekDay + every: every + onMonthDay: + - 5.3974389415088355 + - 5.3974389415088355 + timezone: timezone + start: start + properties: + custom: + $ref: '#/components/schemas/maintenance_window_response_properties_schedule_custom' + required: + - custom + maintenance_window_response_properties_scope_alerting_query: + additionalProperties: true + example: + kql: kql + properties: + kql: + description: A filter written in Kibana Query Language (KQL). + type: string + required: + - kql + maintenance_window_response_properties_scope_alerting: + additionalProperties: true + example: + query: + kql: kql + properties: + query: + $ref: '#/components/schemas/maintenance_window_response_properties_scope_alerting_query' + required: + - query + maintenance_window_response_properties_scope: + additionalProperties: true + example: + alerting: + query: + kql: kql + properties: + alerting: + $ref: '#/components/schemas/maintenance_window_response_properties_scope_alerting' + required: + - alerting securitySchemes: basicAuth: scheme: basic diff --git a/generated/alerting/api_alerting.go b/generated/alerting/api_alerting.go index 57a4ce27c..43b0ebd6b 100644 --- a/generated/alerting/api_alerting.go +++ b/generated/alerting/api_alerting.go @@ -22,6 +22,21 @@ import ( type AlertingAPI interface { + /* + CreateMaintenanceWindow Create a maintenance window. + + [Required authorization] Route required privileges: ALL of [write-maintenance-window]. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiCreateMaintenanceWindowRequest + */ + CreateMaintenanceWindow(ctx context.Context, spaceId interface{}) ApiCreateMaintenanceWindowRequest + + // CreateMaintenanceWindowExecute executes the request + // @return MaintenanceWindowResponseProperties + CreateMaintenanceWindowExecute(r ApiCreateMaintenanceWindowRequest) (*MaintenanceWindowResponseProperties, *http.Response, error) + /* CreateRule Creates a rule with a randomly generated rule identifier. @@ -55,6 +70,21 @@ type AlertingAPI interface { // @return RuleResponseProperties CreateRuleIdExecute(r ApiCreateRuleIdRequest) (*RuleResponseProperties, *http.Response, error) + /* + DeleteMaintenanceWindow Delete a maintenance window + + Delete a maintenance window by ID.

[Required authorization] Route required privileges: ALL of [write-maintenance-window]. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param maintenanceWindowId An identifier for the maintenance window. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiDeleteMaintenanceWindowRequest + */ + DeleteMaintenanceWindow(ctx context.Context, maintenanceWindowId interface{}, spaceId interface{}) ApiDeleteMaintenanceWindowRequest + + // DeleteMaintenanceWindowExecute executes the request + DeleteMaintenanceWindowExecute(r ApiDeleteMaintenanceWindowRequest) (*http.Response, error) + /* DeleteRule Deletes a rule. @@ -135,6 +165,22 @@ type AlertingAPI interface { // @return GetAlertingHealth200Response GetAlertingHealthExecute(r ApiGetAlertingHealthRequest) (*GetAlertingHealth200Response, *http.Response, error) + /* + GetMaintenanceWindow Get a maintenance window + + Get a maintenance window by ID.

[Required authorization] Route required privileges: ALL of [read-maintenance-window]. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param maintenanceWindowId An identifier for the maintenance window. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiGetMaintenanceWindowRequest + */ + GetMaintenanceWindow(ctx context.Context, maintenanceWindowId interface{}, spaceId interface{}) ApiGetMaintenanceWindowRequest + + // GetMaintenanceWindowExecute executes the request + // @return MaintenanceWindowResponseProperties + GetMaintenanceWindowExecute(r ApiGetMaintenanceWindowRequest) (*MaintenanceWindowResponseProperties, *http.Response, error) + /* GetRule Retrieves a rule by its identifier. @@ -475,6 +521,22 @@ type AlertingAPI interface { // UnmuteAllAlertsExecute executes the request UnmuteAllAlertsExecute(r ApiUnmuteAllAlertsRequest) (*http.Response, error) + /* + UpdateMaintenanceWindow Update a maintenance window. + + [Required authorization] Route required privileges: ALL of [write-maintenance-window]. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param maintenanceWindowId An identifier for the maintenance window. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiUpdateMaintenanceWindowRequest + */ + UpdateMaintenanceWindow(ctx context.Context, maintenanceWindowId interface{}, spaceId interface{}) ApiUpdateMaintenanceWindowRequest + + // UpdateMaintenanceWindowExecute executes the request + // @return MaintenanceWindowResponseProperties + UpdateMaintenanceWindowExecute(r ApiUpdateMaintenanceWindowRequest) (*MaintenanceWindowResponseProperties, *http.Response, error) + /* UpdateRule Updates the attributes for a rule. @@ -511,6 +573,143 @@ type AlertingAPI interface { // AlertingAPIService AlertingAPI service type AlertingAPIService service +type ApiCreateMaintenanceWindowRequest struct { + ctx context.Context + ApiService AlertingAPI + kbnXsrf *interface{} + spaceId interface{} + createMaintenanceWindowRequest *CreateMaintenanceWindowRequest +} + +// Cross-site request forgery protection +func (r ApiCreateMaintenanceWindowRequest) KbnXsrf(kbnXsrf interface{}) ApiCreateMaintenanceWindowRequest { + r.kbnXsrf = &kbnXsrf + return r +} + +func (r ApiCreateMaintenanceWindowRequest) CreateMaintenanceWindowRequest(createMaintenanceWindowRequest CreateMaintenanceWindowRequest) ApiCreateMaintenanceWindowRequest { + r.createMaintenanceWindowRequest = &createMaintenanceWindowRequest + return r +} + +func (r ApiCreateMaintenanceWindowRequest) Execute() (*MaintenanceWindowResponseProperties, *http.Response, error) { + return r.ApiService.CreateMaintenanceWindowExecute(r) +} + +/* +CreateMaintenanceWindow Create a maintenance window. + +[Required authorization] Route required privileges: ALL of [write-maintenance-window]. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiCreateMaintenanceWindowRequest +*/ +func (a *AlertingAPIService) CreateMaintenanceWindow(ctx context.Context, spaceId interface{}) ApiCreateMaintenanceWindowRequest { + return ApiCreateMaintenanceWindowRequest{ + ApiService: a, + ctx: ctx, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return MaintenanceWindowResponseProperties +func (a *AlertingAPIService) CreateMaintenanceWindowExecute(r ApiCreateMaintenanceWindowRequest) (*MaintenanceWindowResponseProperties, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MaintenanceWindowResponseProperties + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.CreateMaintenanceWindow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/maintenance_window" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kbnXsrf == nil { + return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + // body params + localVarPostBody = r.createMaintenanceWindowRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiCreateRuleRequest struct { ctx context.Context ApiService AlertingAPI @@ -837,6 +1036,127 @@ func (a *AlertingAPIService) CreateRuleIdExecute(r ApiCreateRuleIdRequest) (*Rul return localVarReturnValue, localVarHTTPResponse, nil } +type ApiDeleteMaintenanceWindowRequest struct { + ctx context.Context + ApiService AlertingAPI + kbnXsrf *interface{} + maintenanceWindowId interface{} + spaceId interface{} +} + +// Cross-site request forgery protection +func (r ApiDeleteMaintenanceWindowRequest) KbnXsrf(kbnXsrf interface{}) ApiDeleteMaintenanceWindowRequest { + r.kbnXsrf = &kbnXsrf + return r +} + +func (r ApiDeleteMaintenanceWindowRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteMaintenanceWindowExecute(r) +} + +/* +DeleteMaintenanceWindow Delete a maintenance window + +Delete a maintenance window by ID.

[Required authorization] Route required privileges: ALL of [write-maintenance-window]. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param maintenanceWindowId An identifier for the maintenance window. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiDeleteMaintenanceWindowRequest +*/ +func (a *AlertingAPIService) DeleteMaintenanceWindow(ctx context.Context, maintenanceWindowId interface{}, spaceId interface{}) ApiDeleteMaintenanceWindowRequest { + return ApiDeleteMaintenanceWindowRequest{ + ApiService: a, + ctx: ctx, + maintenanceWindowId: maintenanceWindowId, + spaceId: spaceId, + } +} + +// Execute executes the request +func (a *AlertingAPIService) DeleteMaintenanceWindowExecute(r ApiDeleteMaintenanceWindowRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.DeleteMaintenanceWindow") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/maintenance_window/{maintenanceWindowId}" + localVarPath = strings.Replace(localVarPath, "{"+"maintenanceWindowId"+"}", url.PathEscape(parameterValueToString(r.maintenanceWindowId, "maintenanceWindowId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kbnXsrf == nil { + return nil, reportError("kbnXsrf is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + type ApiDeleteRuleRequest struct { ctx context.Context ApiService AlertingAPI @@ -1639,6 +1959,128 @@ func (a *AlertingAPIService) GetAlertingHealthExecute(r ApiGetAlertingHealthRequ return localVarReturnValue, localVarHTTPResponse, nil } +type ApiGetMaintenanceWindowRequest struct { + ctx context.Context + ApiService AlertingAPI + maintenanceWindowId interface{} + spaceId interface{} +} + +func (r ApiGetMaintenanceWindowRequest) Execute() (*MaintenanceWindowResponseProperties, *http.Response, error) { + return r.ApiService.GetMaintenanceWindowExecute(r) +} + +/* +GetMaintenanceWindow Get a maintenance window + +Get a maintenance window by ID.

[Required authorization] Route required privileges: ALL of [read-maintenance-window]. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param maintenanceWindowId An identifier for the maintenance window. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiGetMaintenanceWindowRequest +*/ +func (a *AlertingAPIService) GetMaintenanceWindow(ctx context.Context, maintenanceWindowId interface{}, spaceId interface{}) ApiGetMaintenanceWindowRequest { + return ApiGetMaintenanceWindowRequest{ + ApiService: a, + ctx: ctx, + maintenanceWindowId: maintenanceWindowId, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return MaintenanceWindowResponseProperties +func (a *AlertingAPIService) GetMaintenanceWindowExecute(r ApiGetMaintenanceWindowRequest) (*MaintenanceWindowResponseProperties, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MaintenanceWindowResponseProperties + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.GetMaintenanceWindow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/maintenance_window/{maintenanceWindowId}" + localVarPath = strings.Replace(localVarPath, "{"+"maintenanceWindowId"+"}", url.PathEscape(parameterValueToString(r.maintenanceWindowId, "maintenanceWindowId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiGetRuleRequest struct { ctx context.Context ApiService AlertingAPI @@ -4356,6 +4798,147 @@ func (a *AlertingAPIService) UnmuteAllAlertsExecute(r ApiUnmuteAllAlertsRequest) return localVarHTTPResponse, nil } +type ApiUpdateMaintenanceWindowRequest struct { + ctx context.Context + ApiService AlertingAPI + kbnXsrf *interface{} + maintenanceWindowId interface{} + spaceId interface{} + updateMaintenanceWindowRequest *UpdateMaintenanceWindowRequest +} + +// Cross-site request forgery protection +func (r ApiUpdateMaintenanceWindowRequest) KbnXsrf(kbnXsrf interface{}) ApiUpdateMaintenanceWindowRequest { + r.kbnXsrf = &kbnXsrf + return r +} + +func (r ApiUpdateMaintenanceWindowRequest) UpdateMaintenanceWindowRequest(updateMaintenanceWindowRequest UpdateMaintenanceWindowRequest) ApiUpdateMaintenanceWindowRequest { + r.updateMaintenanceWindowRequest = &updateMaintenanceWindowRequest + return r +} + +func (r ApiUpdateMaintenanceWindowRequest) Execute() (*MaintenanceWindowResponseProperties, *http.Response, error) { + return r.ApiService.UpdateMaintenanceWindowExecute(r) +} + +/* +UpdateMaintenanceWindow Update a maintenance window. + +[Required authorization] Route required privileges: ALL of [write-maintenance-window]. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param maintenanceWindowId An identifier for the maintenance window. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiUpdateMaintenanceWindowRequest +*/ +func (a *AlertingAPIService) UpdateMaintenanceWindow(ctx context.Context, maintenanceWindowId interface{}, spaceId interface{}) ApiUpdateMaintenanceWindowRequest { + return ApiUpdateMaintenanceWindowRequest{ + ApiService: a, + ctx: ctx, + maintenanceWindowId: maintenanceWindowId, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return MaintenanceWindowResponseProperties +func (a *AlertingAPIService) UpdateMaintenanceWindowExecute(r ApiUpdateMaintenanceWindowRequest) (*MaintenanceWindowResponseProperties, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MaintenanceWindowResponseProperties + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.UpdateMaintenanceWindow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/maintenance_window/{maintenanceWindowId}" + localVarPath = strings.Replace(localVarPath, "{"+"maintenanceWindowId"+"}", url.PathEscape(parameterValueToString(r.maintenanceWindowId, "maintenanceWindowId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kbnXsrf == nil { + return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + // body params + localVarPostBody = r.updateMaintenanceWindowRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiUpdateRuleRequest struct { ctx context.Context ApiService AlertingAPI diff --git a/generated/alerting/api_alerting_mocks.go b/generated/alerting/api_alerting_mocks.go index d29559207..bb8525834 100644 --- a/generated/alerting/api_alerting_mocks.go +++ b/generated/alerting/api_alerting_mocks.go @@ -1,9 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: ../generated/alerting/api_alerting.go +// Source: ./api_alerting.go // // Generated by this command: // -// mockgen -destination=../generated/alerting/api_alerting_mocks.go -package=alerting -source ../generated/alerting/api_alerting.go AlertingAPI +// mockgen -destination=./api_alerting_mocks.go -package=alerting -source ./api_alerting.go AlertingAPI // // Package alerting is a generated GoMock package. @@ -21,6 +21,7 @@ import ( type MockAlertingAPI struct { ctrl *gomock.Controller recorder *MockAlertingAPIMockRecorder + isgomock struct{} } // MockAlertingAPIMockRecorder is the mock recorder for MockAlertingAPI. @@ -40,6 +41,36 @@ func (m *MockAlertingAPI) EXPECT() *MockAlertingAPIMockRecorder { return m.recorder } +// CreateMaintenanceWindow mocks base method. +func (m *MockAlertingAPI) CreateMaintenanceWindow(ctx context.Context, spaceId any) ApiCreateMaintenanceWindowRequest { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateMaintenanceWindow", ctx, spaceId) + ret0, _ := ret[0].(ApiCreateMaintenanceWindowRequest) + return ret0 +} + +// CreateMaintenanceWindow indicates an expected call of CreateMaintenanceWindow. +func (mr *MockAlertingAPIMockRecorder) CreateMaintenanceWindow(ctx, spaceId any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateMaintenanceWindow", reflect.TypeOf((*MockAlertingAPI)(nil).CreateMaintenanceWindow), ctx, spaceId) +} + +// CreateMaintenanceWindowExecute mocks base method. +func (m *MockAlertingAPI) CreateMaintenanceWindowExecute(r ApiCreateMaintenanceWindowRequest) (*MaintenanceWindowResponseProperties, *http.Response, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateMaintenanceWindowExecute", r) + ret0, _ := ret[0].(*MaintenanceWindowResponseProperties) + ret1, _ := ret[1].(*http.Response) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// CreateMaintenanceWindowExecute indicates an expected call of CreateMaintenanceWindowExecute. +func (mr *MockAlertingAPIMockRecorder) CreateMaintenanceWindowExecute(r any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateMaintenanceWindowExecute", reflect.TypeOf((*MockAlertingAPI)(nil).CreateMaintenanceWindowExecute), r) +} + // CreateRule mocks base method. func (m *MockAlertingAPI) CreateRule(ctx context.Context, spaceId any) ApiCreateRuleRequest { m.ctrl.T.Helper() @@ -100,6 +131,35 @@ func (mr *MockAlertingAPIMockRecorder) CreateRuleIdExecute(r any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRuleIdExecute", reflect.TypeOf((*MockAlertingAPI)(nil).CreateRuleIdExecute), r) } +// DeleteMaintenanceWindow mocks base method. +func (m *MockAlertingAPI) DeleteMaintenanceWindow(ctx context.Context, maintenanceWindowId, spaceId any) ApiDeleteMaintenanceWindowRequest { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteMaintenanceWindow", ctx, maintenanceWindowId, spaceId) + ret0, _ := ret[0].(ApiDeleteMaintenanceWindowRequest) + return ret0 +} + +// DeleteMaintenanceWindow indicates an expected call of DeleteMaintenanceWindow. +func (mr *MockAlertingAPIMockRecorder) DeleteMaintenanceWindow(ctx, maintenanceWindowId, spaceId any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteMaintenanceWindow", reflect.TypeOf((*MockAlertingAPI)(nil).DeleteMaintenanceWindow), ctx, maintenanceWindowId, spaceId) +} + +// DeleteMaintenanceWindowExecute mocks base method. +func (m *MockAlertingAPI) DeleteMaintenanceWindowExecute(r ApiDeleteMaintenanceWindowRequest) (*http.Response, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteMaintenanceWindowExecute", r) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteMaintenanceWindowExecute indicates an expected call of DeleteMaintenanceWindowExecute. +func (mr *MockAlertingAPIMockRecorder) DeleteMaintenanceWindowExecute(r any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteMaintenanceWindowExecute", reflect.TypeOf((*MockAlertingAPI)(nil).DeleteMaintenanceWindowExecute), r) +} + // DeleteRule mocks base method. func (m *MockAlertingAPI) DeleteRule(ctx context.Context, ruleId, spaceId any) ApiDeleteRuleRequest { m.ctrl.T.Helper() @@ -247,6 +307,36 @@ func (mr *MockAlertingAPIMockRecorder) GetAlertingHealthExecute(r any) *gomock.C return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAlertingHealthExecute", reflect.TypeOf((*MockAlertingAPI)(nil).GetAlertingHealthExecute), r) } +// GetMaintenanceWindow mocks base method. +func (m *MockAlertingAPI) GetMaintenanceWindow(ctx context.Context, maintenanceWindowId, spaceId any) ApiGetMaintenanceWindowRequest { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetMaintenanceWindow", ctx, maintenanceWindowId, spaceId) + ret0, _ := ret[0].(ApiGetMaintenanceWindowRequest) + return ret0 +} + +// GetMaintenanceWindow indicates an expected call of GetMaintenanceWindow. +func (mr *MockAlertingAPIMockRecorder) GetMaintenanceWindow(ctx, maintenanceWindowId, spaceId any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMaintenanceWindow", reflect.TypeOf((*MockAlertingAPI)(nil).GetMaintenanceWindow), ctx, maintenanceWindowId, spaceId) +} + +// GetMaintenanceWindowExecute mocks base method. +func (m *MockAlertingAPI) GetMaintenanceWindowExecute(r ApiGetMaintenanceWindowRequest) (*MaintenanceWindowResponseProperties, *http.Response, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetMaintenanceWindowExecute", r) + ret0, _ := ret[0].(*MaintenanceWindowResponseProperties) + ret1, _ := ret[1].(*http.Response) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// GetMaintenanceWindowExecute indicates an expected call of GetMaintenanceWindowExecute. +func (mr *MockAlertingAPIMockRecorder) GetMaintenanceWindowExecute(r any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMaintenanceWindowExecute", reflect.TypeOf((*MockAlertingAPI)(nil).GetMaintenanceWindowExecute), r) +} + // GetRule mocks base method. func (m *MockAlertingAPI) GetRule(ctx context.Context, ruleId, spaceId any) ApiGetRuleRequest { m.ctrl.T.Helper() @@ -806,6 +896,36 @@ func (mr *MockAlertingAPIMockRecorder) UnmuteAllAlertsExecute(r any) *gomock.Cal return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnmuteAllAlertsExecute", reflect.TypeOf((*MockAlertingAPI)(nil).UnmuteAllAlertsExecute), r) } +// UpdateMaintenanceWindow mocks base method. +func (m *MockAlertingAPI) UpdateMaintenanceWindow(ctx context.Context, maintenanceWindowId, spaceId any) ApiUpdateMaintenanceWindowRequest { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateMaintenanceWindow", ctx, maintenanceWindowId, spaceId) + ret0, _ := ret[0].(ApiUpdateMaintenanceWindowRequest) + return ret0 +} + +// UpdateMaintenanceWindow indicates an expected call of UpdateMaintenanceWindow. +func (mr *MockAlertingAPIMockRecorder) UpdateMaintenanceWindow(ctx, maintenanceWindowId, spaceId any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateMaintenanceWindow", reflect.TypeOf((*MockAlertingAPI)(nil).UpdateMaintenanceWindow), ctx, maintenanceWindowId, spaceId) +} + +// UpdateMaintenanceWindowExecute mocks base method. +func (m *MockAlertingAPI) UpdateMaintenanceWindowExecute(r ApiUpdateMaintenanceWindowRequest) (*MaintenanceWindowResponseProperties, *http.Response, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateMaintenanceWindowExecute", r) + ret0, _ := ret[0].(*MaintenanceWindowResponseProperties) + ret1, _ := ret[1].(*http.Response) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// UpdateMaintenanceWindowExecute indicates an expected call of UpdateMaintenanceWindowExecute. +func (mr *MockAlertingAPIMockRecorder) UpdateMaintenanceWindowExecute(r any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateMaintenanceWindowExecute", reflect.TypeOf((*MockAlertingAPI)(nil).UpdateMaintenanceWindowExecute), r) +} + // UpdateRule mocks base method. func (m *MockAlertingAPI) UpdateRule(ctx context.Context, ruleId, spaceId any) ApiUpdateRuleRequest { m.ctrl.T.Helper() diff --git a/generated/alerting/bundled.yaml b/generated/alerting/bundled.yaml index 07c6e06a8..0c62dd355 100644 --- a/generated/alerting/bundled.yaml +++ b/generated/alerting/bundled.yaml @@ -2,7 +2,7 @@ openapi: 3.1.0 info: title: Alerting description: OpenAPI schema for alerting endpoints - version: '0.2' + version: "0.2" contact: name: Alerting Team license: @@ -26,55 +26,55 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/space_id" requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/create_rule_request' + $ref: "#/components/schemas/create_rule_request" examples: createEsQueryEsqlRuleRequest: - $ref: '#/components/examples/create_es_query_esql_rule_request' + $ref: "#/components/examples/create_es_query_esql_rule_request" createEsQueryRuleRequest: - $ref: '#/components/examples/create_es_query_rule_request' + $ref: "#/components/examples/create_es_query_rule_request" createEsQueryKqlRuleRequest: - $ref: '#/components/examples/create_es_query_kql_rule_request' + $ref: "#/components/examples/create_es_query_kql_rule_request" createIndexThresholdRuleRequest: - $ref: '#/components/examples/create_index_threshold_rule_request' + $ref: "#/components/examples/create_index_threshold_rule_request" createTrackingContainmentRuleRequest: - $ref: '#/components/examples/create_tracking_containment_rule_request' + $ref: "#/components/examples/create_tracking_containment_rule_request" responses: - '200': + "200": description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/rule_response_properties' + $ref: "#/components/schemas/rule_response_properties" examples: createEsQueryEsqlRuleResponse: - $ref: '#/components/examples/create_es_query_esql_rule_response' + $ref: "#/components/examples/create_es_query_esql_rule_response" createEsQueryRuleResponse: - $ref: '#/components/examples/create_es_query_rule_response' + $ref: "#/components/examples/create_es_query_rule_response" createEsQueryKqlRuleResponse: - $ref: '#/components/examples/create_es_query_kql_rule_response' + $ref: "#/components/examples/create_es_query_kql_rule_response" createIndexThresholdRuleResponse: - $ref: '#/components/examples/create_index_threshold_rule_response' + $ref: "#/components/examples/create_index_threshold_rule_response" createTrackingContainmentRuleResponse: - $ref: '#/components/examples/create_tracking_containment_rule_response' - '401': + $ref: "#/components/examples/create_tracking_containment_rule_response" + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' - '404': + $ref: "#/components/schemas/401_response" + "404": description: Object is not found. content: application/json: schema: - $ref: '#/components/schemas/404_response' + $ref: "#/components/schemas/404_response" /s/{spaceId}/api/alerting/rule/{ruleId}: get: summary: Retrieves a rule by its identifier. @@ -84,30 +84,30 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/rule_id" + - $ref: "#/components/parameters/space_id" responses: - '200': + "200": description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/rule_response_properties' + $ref: "#/components/schemas/rule_response_properties" examples: getRuleResponse: - $ref: '#/components/examples/get_rule_response' - '401': + $ref: "#/components/examples/get_rule_response" + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' - '404': + $ref: "#/components/schemas/401_response" + "404": description: Object is not found. content: application/json: schema: - $ref: '#/components/schemas/404_response' + $ref: "#/components/schemas/404_response" delete: summary: Deletes a rule. operationId: deleteRule @@ -116,24 +116,24 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/rule_id" + - $ref: "#/components/parameters/space_id" responses: - '204': + "204": description: Indicates a successful call. - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' - '404': + $ref: "#/components/schemas/401_response" + "404": description: Object is not found. content: application/json: schema: - $ref: '#/components/schemas/404_response' + $ref: "#/components/schemas/404_response" post: summary: Creates a rule with a specific rule identifier. operationId: createRuleId @@ -142,8 +142,8 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/space_id" - in: path name: ruleId description: | @@ -158,44 +158,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/create_rule_request' + $ref: "#/components/schemas/create_rule_request" examples: createEsQueryEsqlRuleIdRequest: - $ref: '#/components/examples/create_es_query_esql_rule_request' + $ref: "#/components/examples/create_es_query_esql_rule_request" createEsQueryRuleIdRequest: - $ref: '#/components/examples/create_es_query_rule_request' + $ref: "#/components/examples/create_es_query_rule_request" createEsQueryKqlRuleIdRequest: - $ref: '#/components/examples/create_es_query_kql_rule_request' + $ref: "#/components/examples/create_es_query_kql_rule_request" createIndexThreholdRuleIdRequest: - $ref: '#/components/examples/create_index_threshold_rule_request' + $ref: "#/components/examples/create_index_threshold_rule_request" responses: - '200': + "200": description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/rule_response_properties' + $ref: "#/components/schemas/rule_response_properties" examples: createEsQueryEsqlRuleIdResponse: - $ref: '#/components/examples/create_es_query_esql_rule_response' + $ref: "#/components/examples/create_es_query_esql_rule_response" createEsQueryRuleIdResponse: - $ref: '#/components/examples/create_es_query_rule_response' + $ref: "#/components/examples/create_es_query_rule_response" createEsQueryKqlRuleIdResponse: - $ref: '#/components/examples/create_es_query_kql_rule_response' + $ref: "#/components/examples/create_es_query_kql_rule_response" createIndexThresholdRuleIdResponse: - $ref: '#/components/examples/create_index_threshold_rule_response' - '401': + $ref: "#/components/examples/create_index_threshold_rule_response" + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' - '404': + $ref: "#/components/schemas/401_response" + "404": description: Object is not found. content: application/json: schema: - $ref: '#/components/schemas/404_response' + $ref: "#/components/schemas/404_response" put: summary: Updates the attributes for a rule. operationId: updateRule @@ -204,40 +204,40 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/rule_id" + - $ref: "#/components/parameters/space_id" requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/update_rule_request' + $ref: "#/components/schemas/update_rule_request" examples: updateRuleRequest: - $ref: '#/components/examples/update_rule_request' + $ref: "#/components/examples/update_rule_request" responses: - '200': + "200": description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/rule_response_properties' + $ref: "#/components/schemas/rule_response_properties" examples: updateRuleResponse: - $ref: '#/components/examples/update_rule_response' - '401': + $ref: "#/components/examples/update_rule_response" + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' - '404': + $ref: "#/components/schemas/401_response" + "404": description: Object is not found. content: application/json: schema: - $ref: '#/components/schemas/404_response' + $ref: "#/components/schemas/404_response" /s/{spaceId}/api/alerting/rule/{ruleId}/_disable: post: summary: Disables a rule. @@ -247,24 +247,24 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/rule_id" + - $ref: "#/components/parameters/space_id" responses: - '204': + "204": description: Indicates a successful call. - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' - '404': + $ref: "#/components/schemas/401_response" + "404": description: Object is not found. content: application/json: schema: - $ref: '#/components/schemas/404_response' + $ref: "#/components/schemas/404_response" /s/{spaceId}/api/alerting/rule/{ruleId}/_enable: post: summary: Enables a rule. @@ -274,24 +274,24 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/rule_id" + - $ref: "#/components/parameters/space_id" responses: - '204': + "204": description: Indicates a successful call. - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' - '404': + $ref: "#/components/schemas/401_response" + "404": description: Object is not found. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerting/rules/_find: get: summary: Retrieves information about rules. @@ -301,7 +301,7 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/space_id" - name: default_search_operator in: query description: The default operator to use for the simple_query_string. @@ -385,7 +385,7 @@ paths: examples: - asc responses: - '200': + "200": description: Indicates a successful call. content: application/json: @@ -395,7 +395,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/rule_response_properties' + $ref: "#/components/schemas/rule_response_properties" page: type: integer per_page: @@ -404,15 +404,15 @@ paths: type: integer examples: findRulesResponse: - $ref: '#/components/examples/find_rules_response' + $ref: "#/components/examples/find_rules_response" findConditionalActionRulesResponse: - $ref: '#/components/examples/find_rules_response_conditional_action' - '401': + $ref: "#/components/examples/find_rules_response_conditional_action" + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerting/_health: get: summary: Retrieves the health status of the alerting framework. @@ -422,9 +422,9 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/space_id" responses: - '200': + "200": description: Indicates a successful call. content: application/json: @@ -452,7 +452,7 @@ paths: type: string format: date-time examples: - - '2023-01-13T01:28:00.280Z' + - "2023-01-13T01:28:00.280Z" execution_health: type: object description: The timestamp and status of the rule run. @@ -469,7 +469,7 @@ paths: type: string format: date-time examples: - - '2023-01-13T01:28:00.280Z' + - "2023-01-13T01:28:00.280Z" read_health: type: object description: The timestamp and status of the rule reading events. @@ -486,7 +486,7 @@ paths: type: string format: date-time examples: - - '2023-01-13T01:28:00.280Z' + - "2023-01-13T01:28:00.280Z" has_permanent_encryption_key: type: boolean description: If `false`, the encrypted saved object plugin does not have a permanent encryption key. @@ -499,13 +499,13 @@ paths: - true examples: getAlertingHealthResponse: - $ref: '#/components/examples/get_health_response' - '401': + $ref: "#/components/examples/get_health_response" + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerting/rule_types: get: summary: Retrieves a list of rule types. @@ -515,9 +515,9 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/space_id" responses: - '200': + "200": description: Indicates a successful call. content: application/json: @@ -594,10 +594,10 @@ paths: type: string description: Indicates whether new fields are added dynamically. enum: - - 'false' + - "false" - runtime - strict - - 'true' + - "true" isSpaceAware: type: boolean description: | @@ -610,7 +610,7 @@ paths: description: | Mapping information for each field supported in alerts as data documents for this rule type. For more information about mapping parameters, refer to the Elasticsearch documentation. additionalProperties: - $ref: '#/components/schemas/fieldmap_properties' + $ref: "#/components/schemas/fieldmap_properties" secondaryAlias: type: string description: | @@ -763,13 +763,13 @@ paths: - 5m examples: getRuleTypesResponse: - $ref: '#/components/examples/get_rule_types_response' - '401': + $ref: "#/components/examples/get_rule_types_response" + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerting/rule/{ruleId}/_mute_all: post: summary: Mutes all alerts. @@ -779,18 +779,18 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/rule_id" + - $ref: "#/components/parameters/space_id" responses: - '204': + "204": description: Indicates a successful call. - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerting/rule/{ruleId}/_unmute_all: post: summary: Unmutes all alerts. @@ -800,18 +800,18 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/rule_id" + - $ref: "#/components/parameters/space_id" responses: - '204': + "204": description: Indicates a successful call. - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerting/rule/{ruleId}/_update_api_key: post: summary: Updates the API key for a rule. @@ -820,18 +820,18 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/rule_id" + - $ref: "#/components/parameters/space_id" responses: - '200': + "200": description: Indicates a successful call. - '400': + "400": description: Bad request content: application/json: schema: - $ref: '#/components/schemas/400_response' + $ref: "#/components/schemas/400_response" /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_mute: post: summary: Mutes an alert. @@ -841,19 +841,19 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/alert_id' - - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/alert_id" + - $ref: "#/components/parameters/rule_id" + - $ref: "#/components/parameters/space_id" responses: - '204': + "204": description: Indicates a successful call. - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute: post: summary: Unmutes an alert. @@ -863,19 +863,19 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/alert_id' - - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/alert_id" + - $ref: "#/components/parameters/rule_id" + - $ref: "#/components/parameters/space_id" responses: - '204': + "204": description: Indicates a successful call. - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerts/alert/{alertId}: delete: summary: Permanently removes an alert. @@ -886,8 +886,8 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/space_id" - in: path name: alertId description: The identifier for the alert. @@ -897,14 +897,14 @@ paths: examples: - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: - '204': + "204": description: Indicates a successful call. - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" get: summary: Retrieves an alert by its identifier. operationId: legacyGetAlert @@ -913,7 +913,7 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/space_id" - in: path name: alertId description: The identifier for the alert. @@ -923,18 +923,18 @@ paths: examples: - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: - '200': + "200": description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/alert_response_properties' - '401': + $ref: "#/components/schemas/alert_response_properties" + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" post: summary: Create an alert. operationId: legacyCreateAlert @@ -943,7 +943,7 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' + - $ref: "#/components/parameters/kbn_xsrf" - in: path name: alertId description: An UUID v1 or v4 identifier for the alert. If this parameter is omitted, the identifier is randomly generated. @@ -952,7 +952,7 @@ paths: type: string examples: - 41893910-6bca-11eb-9e0d-85d233e3ee35 - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/space_id" requestBody: required: true content: @@ -1034,18 +1034,18 @@ paths: description: | How often this alert should fire the same actions. This will prevent the alert from sending out the same notification over and over. For example, if an alert with a schedule of 1 minute stays in a triggered state for 90 minutes, setting a throttle of `10m` or `1h` will prevent it from sending 90 notifications during this period. responses: - '200': + "200": description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/alert_response_properties' - '401': + $ref: "#/components/schemas/alert_response_properties" + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" put: summary: Updates the attributes for an alert. operationId: legacyUpdateAlert @@ -1054,8 +1054,8 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/space_id" - in: path name: alertId description: The identifier for the alert. @@ -1134,18 +1134,18 @@ paths: description: | How often this alert should fire the same actions. This will prevent the alert from sending out the same notification over and over. For example, if an alert with a schedule of 1 minute stays in a triggered state for 90 minutes, setting a throttle of `10m` or `1h` will prevent it from sending 90 notifications during this period. responses: - '200': + "200": description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/alert_response_properties' - '401': + $ref: "#/components/schemas/alert_response_properties" + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerts/alert/{alertId}/_disable: post: summary: Disables an alert. @@ -1155,8 +1155,8 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/space_id" - in: path name: alertId description: The identifier for the alert. @@ -1166,14 +1166,14 @@ paths: examples: - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: - '204': + "204": description: Indicates a successful call. - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerts/alert/{alertId}/_enable: post: summary: Enables an alert. @@ -1183,8 +1183,8 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/space_id" - in: path name: alertId description: The identifier for the alert. @@ -1194,14 +1194,14 @@ paths: examples: - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: - '204': + "204": description: Indicates a successful call. - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerts/alert/{alertId}/_mute_all: post: summary: Mutes all alert instances. @@ -1211,8 +1211,8 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/space_id" - in: path name: alertId description: The identifier for the alert. @@ -1222,14 +1222,14 @@ paths: examples: - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: - '204': + "204": description: Indicates a successful call. - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerts/alert/{alertId}/_unmute_all: post: summary: Unmutes all alert instances. @@ -1239,8 +1239,8 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/space_id" - in: path name: alertId description: The identifier for the alert. @@ -1250,14 +1250,14 @@ paths: examples: - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: - '204': + "204": description: Indicates a successful call. - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerts/alerts/_find: get: summary: Retrieves a paginated set of alerts. @@ -1268,7 +1268,7 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/space_id" - name: default_search_operator in: query description: The default operator to use for the `simple_query_string`. @@ -1348,7 +1348,7 @@ paths: examples: - asc responses: - '200': + "200": description: Indicates a successful call. content: application/json: @@ -1358,19 +1358,19 @@ paths: data: type: array items: - $ref: '#/components/schemas/alert_response_properties' + $ref: "#/components/schemas/alert_response_properties" page: type: integer perPage: type: integer total: type: integer - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerts/alerts/_health: get: summary: Retrieves the health status of the alerting framework. @@ -1380,9 +1380,9 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/space_id" responses: - '200': + "200": description: Indicates a successful call. content: application/json: @@ -1410,7 +1410,7 @@ paths: type: string format: date-time examples: - - '2023-01-13T01:28:00.280Z' + - "2023-01-13T01:28:00.280Z" executionHealth: type: object description: The timestamp and status of the alert execution. @@ -1427,7 +1427,7 @@ paths: type: string format: date-time examples: - - '2023-01-13T01:28:00.280Z' + - "2023-01-13T01:28:00.280Z" readHealth: type: object description: The timestamp and status of the alert reading events. @@ -1444,7 +1444,7 @@ paths: type: string format: date-time examples: - - '2023-01-13T01:28:00.280Z' + - "2023-01-13T01:28:00.280Z" hasPermanentEncryptionKey: type: boolean description: If `false`, the encrypted saved object plugin does not have a permanent encryption key. @@ -1455,12 +1455,12 @@ paths: description: If `false`, security is enabled but TLS is not. examples: - true - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerts/alerts/list_alert_types: get: summary: Retrieves a list of alert types. @@ -1470,9 +1470,9 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/space_id" responses: - '200': + "200": description: Indicates a successful call. content: application/json: @@ -1557,12 +1557,12 @@ paths: type: string name: type: string - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_mute: post: summary: Mutes an alert instance. @@ -1572,8 +1572,8 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/space_id" - in: path name: alertId description: An identifier for the alert. @@ -1591,14 +1591,14 @@ paths: examples: - dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2 responses: - '204': + "204": description: Indicates a successful call. - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" /s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute: post: summary: Unmutes an alert instance. @@ -1608,8 +1608,8 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/space_id" - in: path name: alertId description: An identifier for the alert. @@ -1627,14 +1627,110 @@ paths: examples: - dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2 responses: - '204': + "204": description: Indicates a successful call. - '401': + "401": description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: "#/components/schemas/401_response" + /s/{spaceId}/api/maintenance_window: + post: + summary: Create a maintenance window. + description: "[Required authorization] Route required privileges: ALL of [write-maintenance-window]." + operationId: createMaintenanceWindow + tags: + - alerting + parameters: + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/space_id" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/create_maintenance_window_request" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/maintenance_window_response_properties" + description: Indicates a successful call. + "400": + description: Indicates an invalid schema or parameters. + "403": + description: Indicates that this call is forbidden. + /s/{spaceId}/api/maintenance_window/{maintenanceWindowId}: + get: + summary: Get a maintenance window + description: "Get a maintenance window by ID.

[Required authorization] Route required privileges: ALL of [read-maintenance-window]." + operationId: getMaintenanceWindow + tags: + - alerting + parameters: + - $ref: "#/components/parameters/maintenance_window_id" + - $ref: "#/components/parameters/space_id" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/maintenance_window_response_properties" + description: Indicates a successful call. + "403": + description: Indicates that this call is forbidden. + "404": + description: Indicates a maintenance window with the given ID does not exist. + delete: + summary: Delete a maintenance window + operationId: deleteMaintenanceWindow + description: "Delete a maintenance window by ID.

[Required authorization] Route required privileges: ALL of [write-maintenance-window]." + tags: + - alerting + parameters: + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/maintenance_window_id" + - $ref: "#/components/parameters/space_id" + responses: + "204": + description: Indicates a successful call. + "400": + description: Indicates an invalid schema or parameters. + "403": + description: Indicates that this call is forbidden. + "404": + description: Indicates a maintenance window with the given ID does not exist. + patch: + description: "[Required authorization] Route required privileges: ALL of [write-maintenance-window]." + operationId: updateMaintenanceWindow + parameters: + - $ref: "#/components/parameters/kbn_xsrf" + - $ref: "#/components/parameters/maintenance_window_id" + - $ref: "#/components/parameters/space_id" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/update_maintenance_window_request" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/maintenance_window_response_properties" + description: Indicates a successful call. + "400": + description: Indicates an invalid schema or parameters. + "403": + description: Indicates that this call is forbidden. + "404": + description: Indicates a maintenance window with the given ID does not exist. + "409": + description: Indicates that the maintenance window has already been updated by another user. + summary: Update a maintenance window. + tags: + - alerting components: securitySchemes: basicAuth: @@ -1644,7 +1740,7 @@ components: type: apiKey in: header name: Authorization - description: 'e.g. Authorization: ApiKey base64AccessApiKey' + description: "e.g. Authorization: ApiKey base64AccessApiKey" parameters: kbn_xsrf: schema: @@ -1680,6 +1776,14 @@ components: type: string examples: - ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + maintenance_window_id: + in: path + name: maintenanceWindowId + description: An identifier for the maintenance window. + required: true + schema: + type: string + example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 schemas: filter: type: object @@ -1691,7 +1795,7 @@ components: alias: type: - string - - 'null' + - "null" controlledBy: type: string disabled: @@ -1731,7 +1835,7 @@ components: throttle_action: type: - string - - 'null' + - "null" description: | The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if `notify_when` is set to `onThrottleInterval`. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values. default: null @@ -1740,7 +1844,7 @@ components: actions: type: - array - - 'null' + - "null" default: [] items: type: object @@ -1766,7 +1870,7 @@ components: filters: type: array items: - $ref: '#/components/schemas/filter' + $ref: "#/components/schemas/filter" timeframe: type: object description: Defines a period that limits whether the action runs. @@ -1791,12 +1895,12 @@ components: type: string description: The end of the time frame in 24-hour notation (`hh:mm`). examples: - - '17:00' + - "17:00" start: type: string description: The start of the time frame in 24-hour notation (`hh:mm`). examples: - - '08:00' + - "08:00" timezone: type: string description: | @@ -1818,12 +1922,12 @@ components: - summary properties: notify_when: - $ref: '#/components/schemas/notify_when_action' + $ref: "#/components/schemas/notify_when_action" summary: type: boolean description: Indicates whether the action is a summary. throttle: - $ref: '#/components/schemas/throttle_action' + $ref: "#/components/schemas/throttle_action" group: type: string description: | @@ -1872,7 +1976,7 @@ components: throttle: type: - string - - 'null' + - "null" description: | Deprecated in 8.13.0. Use the `throttle` property in the action `frequency` object instead. The throttle interval, which defines how often an alert generates repeated actions. NOTE: You cannot specify the throttle interval at both the rule and action level. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values. default: null @@ -1901,7 +2005,7 @@ components: - schedule properties: actions: - $ref: '#/components/schemas/actions' + $ref: "#/components/schemas/actions" consumer: type: string description: | @@ -1914,7 +2018,7 @@ components: description: The name of the rule. While this name does not have to be unique, a distinctive name can help you identify a rule. example: cluster_health_rule notify_when: - $ref: '#/components/schemas/notify_when' + $ref: "#/components/schemas/notify_when" params: type: object description: The parameters for the rule. @@ -1924,13 +2028,13 @@ components: description: | The ID of the rule type that you want to call when the rule is scheduled to run. For example, `.es-query`, `.index-threshold`, `logs.alert.document.count`, `monitoring_alert_cluster_health`, `siem.thresholdRule`, or `xpack.ml.anomaly_detection_alert`. schedule: - $ref: '#/components/schemas/schedule' + $ref: "#/components/schemas/schedule" tags: - $ref: '#/components/schemas/tags' + $ref: "#/components/schemas/tags" throttle: - $ref: '#/components/schemas/throttle' + $ref: "#/components/schemas/throttle" alert_delay: - $ref: '#/components/schemas/alert_delay' + $ref: "#/components/schemas/alert_delay" rule_response_properties: title: Rule response properties type: object @@ -1955,9 +2059,9 @@ components: - updated_by properties: actions: - $ref: '#/components/schemas/actions' + $ref: "#/components/schemas/actions" alert_delay: - $ref: '#/components/schemas/alert_delay' + $ref: "#/components/schemas/alert_delay" api_key_created_by_user: type: boolean description: Indicates whether the API key that is associated with the rule was created by the user. @@ -1966,7 +2070,7 @@ components: api_key_owner: type: - string - - 'null' + - "null" description: | The owner of the API key that is associated with the rule and used to run background tasks. examples: @@ -1981,11 +2085,11 @@ components: description: The date and time that the rule was created. format: date-time examples: - - '2022-12-05T23:36:58.284Z' + - "2022-12-05T23:36:58.284Z" created_by: type: - string - - 'null' + - "null" description: The identifier for the user that created the rule. examples: - elastic @@ -2005,7 +2109,7 @@ components: type: string format: date-time examples: - - '2022-12-06T00:13:43.890Z' + - "2022-12-06T00:13:43.890Z" status: type: string examples: @@ -2036,7 +2140,7 @@ components: outcome_msg: type: - array - - 'null' + - "null" items: type: string outcome_order: @@ -2044,13 +2148,13 @@ components: warning: type: - string - - 'null' + - "null" examples: - null muted_alert_ids: type: - array - - 'null' + - "null" items: type: string mute_all: @@ -2065,14 +2169,14 @@ components: next_run: type: - string - - 'null' + - "null" format: date-time examples: - - '2022-12-06T00:14:43.818Z' + - "2022-12-06T00:14:43.818Z" notify_when: type: - string - - 'null' + - "null" description: Indicates how often alerts generate actions. params: type: object @@ -2091,24 +2195,24 @@ components: type: boolean description: Indicates whether the rule is running. schedule: - $ref: '#/components/schemas/schedule' + $ref: "#/components/schemas/schedule" scheduled_task_id: type: string examples: - b530fed0-74f5-11ed-9801-35303b735aef tags: - $ref: '#/components/schemas/tags' + $ref: "#/components/schemas/tags" throttle: - $ref: '#/components/schemas/throttle' + $ref: "#/components/schemas/throttle" updated_at: type: string description: The date and time that the rule was updated most recently. examples: - - '2022-12-05T23:36:58.284Z' + - "2022-12-05T23:36:58.284Z" updated_by: type: - string - - 'null' + - "null" description: The identifier for the user that updated this rule most recently. examples: - elastic @@ -2160,26 +2264,26 @@ components: - schedule properties: actions: - $ref: '#/components/schemas/actions' + $ref: "#/components/schemas/actions" alert_delay: - $ref: '#/components/schemas/alert_delay' + $ref: "#/components/schemas/alert_delay" name: type: string description: The name of the rule. examples: - cluster_health_rule notify_when: - $ref: '#/components/schemas/notify_when' + $ref: "#/components/schemas/notify_when" params: type: object description: The parameters for the rule. additionalProperties: true schedule: - $ref: '#/components/schemas/schedule' + $ref: "#/components/schemas/schedule" tags: - $ref: '#/components/schemas/tags' + $ref: "#/components/schemas/tags" throttle: - $ref: '#/components/schemas/throttle' + $ref: "#/components/schemas/throttle" fieldmap_properties: title: Field map objects in the get rule types response type: object @@ -2219,7 +2323,7 @@ components: scaling_factor: type: integer description: | - The scaling factor to use when encoding values. This property is applicable when `type` is `scaled_float`. Values will be multiplied by this factor at index time and rounded to the closest long value. + The scaling factor to use when encoding values. This property is applicable when `type` is `scaled_float`. Values will be multiplied by this factor at index time and rounded to the closest long value. type: type: string description: Specifies the data type for the field. @@ -2257,7 +2361,7 @@ components: apiKeyOwner: type: - string - - 'null' + - "null" examples: - elastic createdAt: @@ -2265,7 +2369,7 @@ components: description: The date and time that the alert was created. format: date-time examples: - - '2022-12-05T23:36:58.284Z' + - "2022-12-05T23:36:58.284Z" createdBy: type: string description: The identifier for the user that created the alert. @@ -2283,7 +2387,7 @@ components: type: string format: date-time examples: - - '2022-12-06T00:13:43.890Z' + - "2022-12-06T00:13:43.890Z" status: type: string examples: @@ -2300,7 +2404,7 @@ components: mutedInstanceIds: type: - array - - 'null' + - "null" items: type: string name: @@ -2331,18 +2435,324 @@ components: throttle: type: - string - - 'null' + - "null" updatedAt: type: string examples: - - '2022-12-05T23:36:58.284Z' + - "2022-12-05T23:36:58.284Z" updatedBy: type: - string - - 'null' + - "null" description: The identifier for the user that updated this alert most recently. examples: - elastic + create_maintenance_window_request: + title: Create maintenance window request + type: object + required: + - title + - schedule + properties: + enabled: + description: Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. + type: boolean + schedule: + type: object + properties: + custom: + type: object + properties: + duration: + description: "The duration of the schedule. It allows values in `` format. `` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`." + type: string + recurring: + type: object + properties: + end: + description: "The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`." + type: string + every: + description: "The interval and frequency of a recurring schedule. It allows values in `` format. `` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`." + type: string + occurrences: + description: The total number of recurrences of the schedule. + minimum: 1 + type: number + onMonth: + description: The specific months for a recurring schedule. Valid values are 1-12. + items: + maximum: 12 + minimum: 1 + type: number + minItems: 1 + type: array + onMonthDay: + description: The specific days of the month for a recurring schedule. Valid values are 1-31. + items: + maximum: 31 + minimum: 1 + type: number + minItems: 1 + type: array + onWeekDay: + description: The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule. + items: + type: string + minItems: 1 + type: array + start: + description: "The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`." + type: string + timezone: + description: The timezone of the schedule. The default timezone is UTC. + type: string + required: + - start + - duration + required: + - custom + scope: + type: object + properties: + alerting: + type: object + properties: + query: + type: object + properties: + kql: + description: A filter written in Kibana Query Language (KQL). + type: string + required: + - kql + required: + - query + required: + - alerting + title: + description: The name of the maintenance window. While this name does not have to be unique, a distinctive name can help you identify a specific maintenance window. + type: string + update_maintenance_window_request: + type: object + properties: + enabled: + description: Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. + type: boolean + schedule: + type: object + properties: + custom: + type: object + properties: + duration: + description: "The duration of the schedule. It allows values in `` format. `` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`." + type: string + recurring: + type: object + properties: + end: + description: "The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`." + type: string + every: + description: "The interval and frequency of a recurring schedule. It allows values in `` format. `` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`." + type: string + occurrences: + description: The total number of recurrences of the schedule. + minimum: 1 + type: number + onMonth: + description: The specific months for a recurring schedule. Valid values are 1-12. + items: + maximum: 12 + minimum: 1 + type: number + minItems: 1 + type: array + onMonthDay: + description: The specific days of the month for a recurring schedule. Valid values are 1-31. + items: + maximum: 31 + minimum: 1 + type: number + minItems: 1 + type: array + onWeekDay: + description: The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule. + items: + type: string + minItems: 1 + type: array + start: + description: "The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`." + type: string + timezone: + description: The timezone of the schedule. The default timezone is UTC. + type: string + required: + - start + - duration + required: + - custom + scope: + type: object + properties: + alerting: + type: object + properties: + query: + type: object + properties: + kql: + description: A filter written in Kibana Query Language (KQL). + type: string + required: + - kql + required: + - query + required: + - alerting + title: + description: The name of the maintenance window. While this name does not have to be unique, a distinctive name can help you identify a specific maintenance window. + type: string + maintenance_window_response_properties: + title: Maintenance Window response properties + type: object + required: + - id + - title + - enabled + - created_by + - updated_by + - created_at + - updated_at + - status + - schedule + properties: + created_at: + description: The date and time when the maintenance window was created. + type: string + created_by: + description: The identifier for the user that created the maintenance window. + nullable: true + type: string + enabled: + description: Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. + type: boolean + id: + description: The identifier for the maintenance window. + type: string + schedule: + additionalProperties: false + type: object + properties: + custom: + additionalProperties: false + type: object + properties: + duration: + description: "The duration of the schedule. It allows values in `` format. `` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`." + type: string + recurring: + additionalProperties: false + type: object + properties: + end: + description: "The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`." + type: string + every: + description: "The interval and frequency of a recurring schedule. It allows values in `` format. `` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`." + type: string + occurrences: + description: The total number of recurrences of the schedule. + minimum: 1 + type: number + onMonth: + description: The specific months for a recurring schedule. Valid values are 1-12. + items: + maximum: 12 + minimum: 1 + type: number + minItems: 1 + type: array + onMonthDay: + description: The specific days of the month for a recurring schedule. Valid values are 1-31. + items: + maximum: 31 + minimum: 1 + type: number + minItems: 1 + type: array + onWeekDay: + description: The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule. + items: + type: string + minItems: 1 + type: array + start: + description: "The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`." + type: string + timezone: + description: The timezone of the schedule. The default timezone is UTC. + type: string + required: + - start + - duration + required: + - custom + scope: + additionalProperties: false + type: object + properties: + alerting: + additionalProperties: false + type: object + properties: + query: + additionalProperties: false + type: object + properties: + kql: + description: A filter written in Kibana Query Language (KQL). + type: string + required: + - kql + required: + - query + required: + - alerting + status: + description: The current status of the maintenance window. + enum: + - running + - upcoming + - finished + - archived + type: string + title: + description: The name of the maintenance window. + type: string + updated_at: + description: The date and time when the maintenance window was last updated. + type: string + updated_by: + description: The identifier for the user that last updated this maintenance window. + nullable: true + type: string + 403_response: + type: object + properties: + statusCode: + type: number + example: 403 + description: Error status code + error: + type: string + example: Forbidden + description: Error type + message: + type: string + description: Error message examples: create_es_query_esql_rule_request: summary: Create an Elasticsearch query rule that uses Elasticsearch Query Language (ES|QL). @@ -2352,11 +2762,11 @@ components: searchType: esqlQuery esqlQuery: esql: FROM kibana_sample_data_logs | KEEP bytes, clientip, host, geo.dest | where geo.dest != "GB" | STATS sumbytes = sum(bytes) by clientip, host | WHERE sumbytes > 5000 | SORT sumbytes desc | LIMIT 10 - timeField: '@timestamp' + timeField: "@timestamp" timeWindowSize: 1 timeWindowUnit: d size: 0 - thresholdComparator: '>' + thresholdComparator: ">" threshold: - 0 consumer: stackAlerts @@ -2404,8 +2814,8 @@ components: size: 100 threshold: - 100 - thresholdComparator: '>' - timeField: '@timestamp' + thresholdComparator: ">" + timeField: "@timestamp" timeWindowSize: 1 timeWindowUnit: d rule_type_id: .es-query @@ -2429,7 +2839,7 @@ components: size: 100 threshold: - 1000 - thresholdComparator: '>' + thresholdComparator: ">" timeWindowSize: 5 timeWindowUnit: m rule_type_id: .es-query @@ -2459,7 +2869,7 @@ components: params: aggType: avg termSize: 6 - thresholdComparator: '>' + thresholdComparator: ">" timeWindowSize: 5 timeWindowUnit: m groupBy: top @@ -2467,7 +2877,7 @@ components: - 1000 index: - .test-index - timeField: '@timestamp' + timeField: "@timestamp" aggField: sheet.version termField: name.keyword rule_type_id: .index-threshold @@ -2482,7 +2892,7 @@ components: name: my tracking rule params: index: kibana_sample_data_logs - dateField": '@timestamp' + dateField": "@timestamp" geoField: geo.coordinates entity: agent.keyword boundaryType: entireIndex @@ -2523,11 +2933,11 @@ components: searchType: esqlQuery esqlQuery: esql: FROM kibana_sample_data_logs | keep bytes, clientip, host, geo.dest | WHERE geo.dest != "GB" | stats sumbytes = sum(bytes) by clientip, host | WHERE sumbytes > 5000 | sort sumbytes desc | limit 10 - timeField: '@timestamp' + timeField: "@timestamp" timeWindowSize: 1 timeWindowUnit: d size: 0 - thresholdComparator: '>' + thresholdComparator: ">" threshold: - 0 excludeHitsFromPreviousRun": true, @@ -2536,8 +2946,8 @@ components: scheduled_task_id: e0d62360-78e8-11ee-9177-f7d404c8c945 created_by: elastic updated_by: elastic", - created_at: '2023-11-01T19:00:10.453Z' - updated_at: '2023-11-01T19:00:10.453Z' + created_at: "2023-11-01T19:00:10.453Z" + updated_at: "2023-11-01T19:00:10.453Z" api_key_owner: elastic api_key_created_by_user: false throttle: null @@ -2546,7 +2956,7 @@ components: muted_alert_ids: [] execution_status: status: pending - last_execution_date: '2023-11-01T19:00:10.453Z' + last_execution_date: "2023-11-01T19:00:10.453Z" revision: 0 running: false create_es_query_rule_response: @@ -2584,13 +2994,13 @@ components: throttle: null uuid: 2324e45b-c0df-45c7-9d70-4993e30be758 params: - thresholdComparator: '>' + thresholdComparator: ">" timeWindowSize: 1 timeWindowUnit: d threshold: - 100 size: 100 - timeField: '@timestamp' + timeField: "@timestamp" index: - kibana_sample_data_logs esQuery: '"""{"query":{"match_all" : {}}}"""' @@ -2601,8 +3011,8 @@ components: scheduled_task_id: 58148c70-407f-11ee-850e-c71febc4ca7f created_by: elastic updated_by: elastic - created_at: '2023-08-22T00:03:38.263Z' - updated_at: '2023-08-22T00:03:38.263Z' + created_at: "2023-08-22T00:03:38.263Z" + updated_at: "2023-08-22T00:03:38.263Z" api_key_owner: elastic api_key_created_by_user: false throttle: null @@ -2611,7 +3021,7 @@ components: muted_alert_ids: [] execution_status: status: pending - last_execution_date: '2023-08-22T00:03:38.263Z' + last_execution_date: "2023-08-22T00:03:38.263Z" revision: 0 running: false create_es_query_kql_rule_response: @@ -2637,15 +3047,15 @@ components: timeWindowUnit: m threshold: - 1000 - thresholdComparator: '>' + thresholdComparator: ">" size: 100 aggType: count groupBy: all excludeHitsFromPreviousRun: true created_by: elastic updated_by: elastic - created_at: '2023-07-14T20:24:50.729Z' - updated_at: '2023-07-14T20:24:50.729Z' + created_at: "2023-07-14T20:24:50.729Z" + updated_at: "2023-07-14T20:24:50.729Z" api_key_owner: elastic api_key_created_by_user: false throttle: null @@ -2655,7 +3065,7 @@ components: scheduled_task_id: 7bd506d0-2284-11ee-8fad-6101956ced88 execution_status: status: pending - last_execution_date: '2023-07-14T20:24:50.729Z' + last_execution_date: "2023-07-14T20:24:50.729Z" revision: 0 running: false create_index_threshold_rule_response: @@ -2683,11 +3093,11 @@ components: api_key_created_by_user: false api_key_owner: elastic consumer: alerts - created_at: '2022-06-08T17:20:31.632Z' + created_at: "2022-06-08T17:20:31.632Z" created_by: elastic enabled: true execution_status: - last_execution_date: '2022-06-08T17:20:31.632Z' + last_execution_date: "2022-06-08T17:20:31.632Z" status: pending id: 41893910-6bca-11eb-9e0d-85d233e3ee35 muted_alert_ids: [] @@ -2697,7 +3107,7 @@ components: params: aggType: avg termSize: 6 - thresholdComparator: '>' + thresholdComparator: ">" timeWindowSize: 5 timeWindowUnit: m groupBy: top @@ -2705,7 +3115,7 @@ components: - 1000 index: - .test-index - timeField: '@timestamp' + timeField: "@timestamp" aggField: sheet.version termField: name.keyword revision: 0 @@ -2717,7 +3127,7 @@ components: tags: - cpu throttle: null - updated_at: '2022-06-08T17:20:31.632Z' + updated_at: "2022-06-08T17:20:31.632Z" updated_by: elastic create_tracking_containment_rule_response: summary: The create rule API returns a JSON object that contains details about the rule. @@ -2734,7 +3144,7 @@ components: interval: 1h params: index: kibana_sample_data_logs - dateField: '@timestamp' + dateField: "@timestamp" geoField: geo.coordinates entity: agent.keyword boundaryType: entireIndex @@ -2746,8 +3156,8 @@ components: rule_type_id: .geo-containment created_by: elastic updated_by: elastic - created_at: '2024-02-14T19:52:55.920Z' - updated_at: '2024-02-15T03:24:32.574Z' + created_at: "2024-02-14T19:52:55.920Z" + updated_at: "2024-02-15T03:24:32.574Z" api_key_owner: elastic notify_when: null mute_all: false @@ -2755,7 +3165,7 @@ components: scheduled_task_id: b6883f9d-5f70-4758-a66e-369d7c26012f execution_status: status: ok - last_execution_date: '2024-02-15T03:25:38.125Z' + last_execution_date: "2024-02-15T03:25:38.125Z" last_duration: 74 actions: [] last_run: @@ -2768,7 +3178,7 @@ components: outcome_order: 0 outcome: succeeded warning: null - next_run: '2024-02-15T03:26:38.033Z' + next_run: "2024-02-15T03:26:38.033Z" api_key_created_by_user: false get_rule_response: summary: The get rule API returns a JSON object that contains details about the rule. @@ -2785,7 +3195,7 @@ components: params: aggType: avg termSize: 6 - thresholdComparator: '>' + thresholdComparator: ">" timeWindowSize: 5 timeWindowUnit: m groupBy: top @@ -2793,15 +3203,15 @@ components: - 1000 index: - test-index - timeField: '@timestamp' + timeField: "@timestamp" aggField: sheet.version termField: name.keyword revision: 1 rule_type_id: .index-threshold created_by: elastic updated_by: elastic - created_at: '2022-12-13T22:33:41.163Z' - updated_at: '2022-12-13T22:33:41.163Z' + created_at: "2022-12-13T22:33:41.163Z" + updated_at: "2022-12-13T22:33:41.163Z" api_key_owner: elastic notify_when: null muted_alert_ids: [] @@ -2809,7 +3219,7 @@ components: scheduled_task_id: 31697a40-7b36-11ed-aa79-f742c05329b2 execution_status: status: ok - last_execution_date: '2022-12-13T22:33:44.388Z' + last_execution_date: "2022-12-13T22:33:44.388Z" last_duration: 83 actions: - group: threshold met @@ -2838,7 +3248,7 @@ components: outcome_msg: null warning: null outcome: succeeded - next_run: '2022-12-13T22:34:44.314Z' + next_run: "2022-12-13T22:34:44.314Z" api_key_created_by_user: false update_rule_request: summary: Update an index threshold rule. @@ -2867,8 +3277,8 @@ components: termSize: 6 threshold: - 1000 - thresholdComparator: '>' - timeField: '@timestamp' + thresholdComparator: ">" + timeField: "@timestamp" timeWindowSize: 5 timeWindowUnit: m name: new name @@ -2891,12 +3301,12 @@ components: params: index: - .updated-index - timeField: '@timestamp' + timeField: "@timestamp" groupBy: top aggType: avg timeWindowSize: 5 timeWindowUnit: m - thresholdComparator: '>' + thresholdComparator: ">" threshold: - 1000 aggField: sheet.version @@ -2907,13 +3317,13 @@ components: updated_by: elastic rule_type_id: .index-threshold scheduled_task_id: 4c5eda00-e74f-11ec-b72f-5b18752ff9ea - created_at: '2024-03-26T23:13:20.985Z' - updated_at: '2024-03-26T23:22:59.949Z' + created_at: "2024-03-26T23:13:20.985Z" + updated_at: "2024-03-26T23:22:59.949Z" mute_all: false muted_alert_ids: [] execution_status: status: ok - last_execution_date: '2024-03-26T23:22:51.390Z' + last_execution_date: "2024-03-26T23:22:51.390Z" last_duration: 52 actions: - group: threshold met @@ -2941,7 +3351,7 @@ components: outcome_msg: null warning: null outcome: succeeded - next_run: '2024-03-26T23:23:51.316Z' + next_run: "2024-03-26T23:23:51.316Z" api_key_created_by_user: false find_rules_response: summary: Retrieve information about a rule. @@ -2962,7 +3372,7 @@ components: params: aggType: avg termSize: 6 - thresholdComparator: '>' + thresholdComparator: ">" timeWindowSize: 5 timeWindowUnit: m groupBy: top @@ -2970,22 +3380,22 @@ components: - 1000 index: - test-index - timeField: '@timestamp' + timeField: "@timestamp" aggField: sheet.version termField: name.keyword revision: 1 rule_type_id: .index-threshold created_by: elastic updated_by: elastic - created_at: '2022-12-05T23:40:33.132Z' - updated_at: '2022-12-05T23:40:33.132Z' + created_at: "2022-12-05T23:40:33.132Z" + updated_at: "2022-12-05T23:40:33.132Z" api_key_owner: elastic mute_all: false muted_alert_ids: [] scheduled_task_id: 3583a470-74f6-11ed-9801-35303b735aef execution_status: status: ok - last_execution_date: '2022-12-06T01:44:23.983Z' + last_execution_date: "2022-12-06T01:44:23.983Z" last_duration: 48 actions: - id: 9dca3e00-74f5-11ed-9801-35303b735aef @@ -3013,7 +3423,7 @@ components: outcome_msg: null warning: null outcome: succeeded - next_run: '2022-12-06T01:45:23.912Z' + next_run: "2022-12-06T01:45:23.912Z" api_key_created_by_user: false find_rules_response_conditional_action: summary: Retrieve information about a rule that has conditional actions. @@ -3039,8 +3449,8 @@ components: falsePositives: [] from: now-3660s immutable: false - license: '' - outputIndex: '' + license: "" + outputIndex: "" meta: from: 1h kibana_siem_app_url: https://localhost:5601/app/security @@ -3058,7 +3468,7 @@ components: language: kuery index: - kibana_sample_data_logs - query: '*' + query: "*" filters: [] threshold: field: @@ -3068,8 +3478,8 @@ components: rule_type_id: siem.thresholdRule created_by: elastic updated_by: elastic - created_at: '2023-05-16T15:50:28.358Z' - updated_at: '2023-05-16T20:25:42.559Z' + created_at: "2023-05-16T15:50:28.358Z" + updated_at: "2023-05-16T20:25:42.559Z" api_key_owner: elastic notify_when: null mute_all: false @@ -3077,7 +3487,7 @@ components: scheduled_task_id: 6107a8f0-f401-11ed-9f8e-399c75a2deeb execution_status: status: ok - last_execution_date: '2023-05-16T20:26:49.590Z' + last_execution_date: "2023-05-16T20:26:49.590Z" last_duration: 166 actions: - group: default @@ -3085,13 +3495,13 @@ components: params: documents: - rule_id: - '[object Object]': null + "[object Object]": null rule_name: - '[object Object]': null + "[object Object]": null alert_id: - '[object Object]': null + "[object Object]": null context_message: - '[object Object]': null + "[object Object]": null connector_type_id: .index frequency: summary: true @@ -3104,10 +3514,10 @@ components: - 7 timezone: UTC hours: - start: '08:00' - end: '17:00' + start: "08:00" + end: "17:00" query: - kql: '' + kql: "" filters: - meta: disabled: false @@ -3135,7 +3545,7 @@ components: outcome_order: 0 warning: null outcome: succeeded - next_run: '2023-05-16T20:27:49.507Z' + next_run: "2023-05-16T20:27:49.507Z" api_key_created_by_user: false get_health_response: summary: Retrieve information about the health of the alerting framework. @@ -3145,13 +3555,13 @@ components: alerting_framework_health: decryption_health: status: ok - timestamp: '2023-01-13T01:28:00.280Z' + timestamp: "2023-01-13T01:28:00.280Z" execution_health: status: ok - timestamp: '2023-01-13T01:28:00.280Z' + timestamp: "2023-01-13T01:28:00.280Z" read_health: status: ok - timestamp: '2023-01-13T01:28:00.280Z' + timestamp: "2023-01-13T01:28:00.280Z" get_rule_types_response: summary: Retrieve rule types associated with Kibana machine learning features value: diff --git a/generated/alerting/docs/AlertingApi.md b/generated/alerting/docs/AlertingApi.md index a13039c35..7946e211d 100644 --- a/generated/alerting/docs/AlertingApi.md +++ b/generated/alerting/docs/AlertingApi.md @@ -4,13 +4,16 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- +[**CreateMaintenanceWindow**](AlertingAPI.md#CreateMaintenanceWindow) | **Post** /s/{spaceId}/api/maintenance_window | Create a maintenance window. [**CreateRule**](AlertingAPI.md#CreateRule) | **Post** /s/{spaceId}/api/alerting/rule | Creates a rule with a randomly generated rule identifier. [**CreateRuleId**](AlertingAPI.md#CreateRuleId) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId} | Creates a rule with a specific rule identifier. +[**DeleteMaintenanceWindow**](AlertingAPI.md#DeleteMaintenanceWindow) | **Delete** /s/{spaceId}/api/maintenance_window/{maintenanceWindowId} | Delete a maintenance window [**DeleteRule**](AlertingAPI.md#DeleteRule) | **Delete** /s/{spaceId}/api/alerting/rule/{ruleId} | Deletes a rule. [**DisableRule**](AlertingAPI.md#DisableRule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_disable | Disables a rule. [**EnableRule**](AlertingAPI.md#EnableRule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_enable | Enables a rule. [**FindRules**](AlertingAPI.md#FindRules) | **Get** /s/{spaceId}/api/alerting/rules/_find | Retrieves information about rules. [**GetAlertingHealth**](AlertingAPI.md#GetAlertingHealth) | **Get** /s/{spaceId}/api/alerting/_health | Retrieves the health status of the alerting framework. +[**GetMaintenanceWindow**](AlertingAPI.md#GetMaintenanceWindow) | **Get** /s/{spaceId}/api/maintenance_window/{maintenanceWindowId} | Get a maintenance window [**GetRule**](AlertingAPI.md#GetRule) | **Get** /s/{spaceId}/api/alerting/rule/{ruleId} | Retrieves a rule by its identifier. [**GetRuleTypes**](AlertingAPI.md#GetRuleTypes) | **Get** /s/{spaceId}/api/alerting/rule_types | Retrieves a list of rule types. [**LegacyCreateAlert**](AlertingAPI.md#LegacyCreateAlert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId} | Create an alert. @@ -30,11 +33,86 @@ Method | HTTP request | Description [**MuteAllAlerts**](AlertingAPI.md#MuteAllAlerts) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_mute_all | Mutes all alerts. [**UnmuteAlert**](AlertingAPI.md#UnmuteAlert) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute | Unmutes an alert. [**UnmuteAllAlerts**](AlertingAPI.md#UnmuteAllAlerts) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_unmute_all | Unmutes all alerts. +[**UpdateMaintenanceWindow**](AlertingAPI.md#UpdateMaintenanceWindow) | **Patch** /s/{spaceId}/api/maintenance_window/{maintenanceWindowId} | Update a maintenance window. [**UpdateRule**](AlertingAPI.md#UpdateRule) | **Put** /s/{spaceId}/api/alerting/rule/{ruleId} | Updates the attributes for a rule. [**UpdateRuleAPIKey**](AlertingAPI.md#UpdateRuleAPIKey) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_update_api_key | Updates the API key for a rule. +## CreateMaintenanceWindow + +> MaintenanceWindowResponseProperties CreateMaintenanceWindow(ctx, spaceId).KbnXsrf(kbnXsrf).CreateMaintenanceWindowRequest(createMaintenanceWindowRequest).Execute() + +Create a maintenance window. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/alerting" +) + +func main() { + kbnXsrf := TODO // interface{} | Cross-site request forgery protection + spaceId := TODO // interface{} | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + createMaintenanceWindowRequest := *openapiclient.NewCreateMaintenanceWindowRequest(*openapiclient.NewCreateMaintenanceWindowRequestSchedule(*openapiclient.NewCreateMaintenanceWindowRequestScheduleCustom("Duration_example", "Start_example")), "Title_example") // CreateMaintenanceWindowRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertingAPI.CreateMaintenanceWindow(context.Background(), spaceId).KbnXsrf(kbnXsrf).CreateMaintenanceWindowRequest(createMaintenanceWindowRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.CreateMaintenanceWindow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateMaintenanceWindow`: MaintenanceWindowResponseProperties + fmt.Fprintf(os.Stdout, "Response from `AlertingAPI.CreateMaintenanceWindow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**spaceId** | [**interface{}**](.md) | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateMaintenanceWindowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kbnXsrf** | [**interface{}**](interface{}.md) | Cross-site request forgery protection | + + **createMaintenanceWindowRequest** | [**CreateMaintenanceWindowRequest**](CreateMaintenanceWindowRequest.md) | | + +### Return type + +[**MaintenanceWindowResponseProperties**](MaintenanceWindowResponseProperties.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## CreateRule > RuleResponseProperties CreateRule(ctx, spaceId).KbnXsrf(kbnXsrf).CreateRuleRequest(createRuleRequest).Execute() @@ -186,6 +264,79 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## DeleteMaintenanceWindow + +> DeleteMaintenanceWindow(ctx, maintenanceWindowId, spaceId).KbnXsrf(kbnXsrf).Execute() + +Delete a maintenance window + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/alerting" +) + +func main() { + kbnXsrf := TODO // interface{} | Cross-site request forgery protection + maintenanceWindowId := TODO // interface{} | An identifier for the maintenance window. + spaceId := TODO // interface{} | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AlertingAPI.DeleteMaintenanceWindow(context.Background(), maintenanceWindowId, spaceId).KbnXsrf(kbnXsrf).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.DeleteMaintenanceWindow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**maintenanceWindowId** | [**interface{}**](.md) | An identifier for the maintenance window. | +**spaceId** | [**interface{}**](.md) | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteMaintenanceWindowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kbnXsrf** | [**interface{}**](interface{}.md) | Cross-site request forgery protection | + + + +### Return type + + (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## DeleteRule > DeleteRule(ctx, ruleId, spaceId).KbnXsrf(kbnXsrf).Execute() @@ -565,6 +716,79 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## GetMaintenanceWindow + +> MaintenanceWindowResponseProperties GetMaintenanceWindow(ctx, maintenanceWindowId, spaceId).Execute() + +Get a maintenance window + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/alerting" +) + +func main() { + maintenanceWindowId := TODO // interface{} | An identifier for the maintenance window. + spaceId := TODO // interface{} | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertingAPI.GetMaintenanceWindow(context.Background(), maintenanceWindowId, spaceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.GetMaintenanceWindow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMaintenanceWindow`: MaintenanceWindowResponseProperties + fmt.Fprintf(os.Stdout, "Response from `AlertingAPI.GetMaintenanceWindow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**maintenanceWindowId** | [**interface{}**](.md) | An identifier for the maintenance window. | +**spaceId** | [**interface{}**](.md) | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetMaintenanceWindowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MaintenanceWindowResponseProperties**](MaintenanceWindowResponseProperties.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## GetRule > RuleResponseProperties GetRule(ctx, ruleId, spaceId).Execute() @@ -1980,6 +2204,83 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## UpdateMaintenanceWindow + +> MaintenanceWindowResponseProperties UpdateMaintenanceWindow(ctx, maintenanceWindowId, spaceId).KbnXsrf(kbnXsrf).UpdateMaintenanceWindowRequest(updateMaintenanceWindowRequest).Execute() + +Update a maintenance window. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/alerting" +) + +func main() { + kbnXsrf := TODO // interface{} | Cross-site request forgery protection + maintenanceWindowId := TODO // interface{} | An identifier for the maintenance window. + spaceId := TODO // interface{} | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + updateMaintenanceWindowRequest := *openapiclient.NewUpdateMaintenanceWindowRequest() // UpdateMaintenanceWindowRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AlertingAPI.UpdateMaintenanceWindow(context.Background(), maintenanceWindowId, spaceId).KbnXsrf(kbnXsrf).UpdateMaintenanceWindowRequest(updateMaintenanceWindowRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.UpdateMaintenanceWindow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateMaintenanceWindow`: MaintenanceWindowResponseProperties + fmt.Fprintf(os.Stdout, "Response from `AlertingAPI.UpdateMaintenanceWindow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**maintenanceWindowId** | [**interface{}**](.md) | An identifier for the maintenance window. | +**spaceId** | [**interface{}**](.md) | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateMaintenanceWindowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kbnXsrf** | [**interface{}**](interface{}.md) | Cross-site request forgery protection | + + + **updateMaintenanceWindowRequest** | [**UpdateMaintenanceWindowRequest**](UpdateMaintenanceWindowRequest.md) | | + +### Return type + +[**MaintenanceWindowResponseProperties**](MaintenanceWindowResponseProperties.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## UpdateRule > RuleResponseProperties UpdateRule(ctx, ruleId, spaceId).KbnXsrf(kbnXsrf).UpdateRuleRequest(updateRuleRequest).Execute() diff --git a/generated/alerting/docs/CreateMaintenanceWindow200Response.md b/generated/alerting/docs/CreateMaintenanceWindow200Response.md new file mode 100644 index 000000000..a80a0b871 --- /dev/null +++ b/generated/alerting/docs/CreateMaintenanceWindow200Response.md @@ -0,0 +1,325 @@ +# CreateMaintenanceWindow200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **interface{}** | The date and time when the maintenance window was created. | +**CreatedBy** | **interface{}** | The identifier for the user that created the maintenance window. | +**Enabled** | **interface{}** | Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. | +**Id** | **interface{}** | The identifier for the maintenance window. | +**Schedule** | [**CreateMaintenanceWindow200ResponseSchedule**](CreateMaintenanceWindow200ResponseSchedule.md) | | +**Scope** | Pointer to [**CreateMaintenanceWindowRequestScope**](CreateMaintenanceWindowRequestScope.md) | | [optional] +**Status** | **interface{}** | The current status of the maintenance window. | +**Title** | **interface{}** | The name of the maintenance window. | +**UpdatedAt** | **interface{}** | The date and time when the maintenance window was last updated. | +**UpdatedBy** | **interface{}** | The identifier for the user that last updated this maintenance window. | + +## Methods + +### NewCreateMaintenanceWindow200Response + +`func NewCreateMaintenanceWindow200Response(createdAt interface{}, createdBy interface{}, enabled interface{}, id interface{}, schedule CreateMaintenanceWindow200ResponseSchedule, status interface{}, title interface{}, updatedAt interface{}, updatedBy interface{}, ) *CreateMaintenanceWindow200Response` + +NewCreateMaintenanceWindow200Response instantiates a new CreateMaintenanceWindow200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateMaintenanceWindow200ResponseWithDefaults + +`func NewCreateMaintenanceWindow200ResponseWithDefaults() *CreateMaintenanceWindow200Response` + +NewCreateMaintenanceWindow200ResponseWithDefaults instantiates a new CreateMaintenanceWindow200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCreatedAt + +`func (o *CreateMaintenanceWindow200Response) GetCreatedAt() interface{}` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *CreateMaintenanceWindow200Response) GetCreatedAtOk() (*interface{}, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *CreateMaintenanceWindow200Response) SetCreatedAt(v interface{})` + +SetCreatedAt sets CreatedAt field to given value. + + +### SetCreatedAtNil + +`func (o *CreateMaintenanceWindow200Response) SetCreatedAtNil(b bool)` + + SetCreatedAtNil sets the value for CreatedAt to be an explicit nil + +### UnsetCreatedAt +`func (o *CreateMaintenanceWindow200Response) UnsetCreatedAt()` + +UnsetCreatedAt ensures that no value is present for CreatedAt, not even an explicit nil +### GetCreatedBy + +`func (o *CreateMaintenanceWindow200Response) GetCreatedBy() interface{}` + +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. + +### GetCreatedByOk + +`func (o *CreateMaintenanceWindow200Response) GetCreatedByOk() (*interface{}, bool)` + +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedBy + +`func (o *CreateMaintenanceWindow200Response) SetCreatedBy(v interface{})` + +SetCreatedBy sets CreatedBy field to given value. + + +### SetCreatedByNil + +`func (o *CreateMaintenanceWindow200Response) SetCreatedByNil(b bool)` + + SetCreatedByNil sets the value for CreatedBy to be an explicit nil + +### UnsetCreatedBy +`func (o *CreateMaintenanceWindow200Response) UnsetCreatedBy()` + +UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +### GetEnabled + +`func (o *CreateMaintenanceWindow200Response) GetEnabled() interface{}` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *CreateMaintenanceWindow200Response) GetEnabledOk() (*interface{}, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *CreateMaintenanceWindow200Response) SetEnabled(v interface{})` + +SetEnabled sets Enabled field to given value. + + +### SetEnabledNil + +`func (o *CreateMaintenanceWindow200Response) SetEnabledNil(b bool)` + + SetEnabledNil sets the value for Enabled to be an explicit nil + +### UnsetEnabled +`func (o *CreateMaintenanceWindow200Response) UnsetEnabled()` + +UnsetEnabled ensures that no value is present for Enabled, not even an explicit nil +### GetId + +`func (o *CreateMaintenanceWindow200Response) GetId() interface{}` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CreateMaintenanceWindow200Response) GetIdOk() (*interface{}, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CreateMaintenanceWindow200Response) SetId(v interface{})` + +SetId sets Id field to given value. + + +### SetIdNil + +`func (o *CreateMaintenanceWindow200Response) SetIdNil(b bool)` + + SetIdNil sets the value for Id to be an explicit nil + +### UnsetId +`func (o *CreateMaintenanceWindow200Response) UnsetId()` + +UnsetId ensures that no value is present for Id, not even an explicit nil +### GetSchedule + +`func (o *CreateMaintenanceWindow200Response) GetSchedule() CreateMaintenanceWindow200ResponseSchedule` + +GetSchedule returns the Schedule field if non-nil, zero value otherwise. + +### GetScheduleOk + +`func (o *CreateMaintenanceWindow200Response) GetScheduleOk() (*CreateMaintenanceWindow200ResponseSchedule, bool)` + +GetScheduleOk returns a tuple with the Schedule field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSchedule + +`func (o *CreateMaintenanceWindow200Response) SetSchedule(v CreateMaintenanceWindow200ResponseSchedule)` + +SetSchedule sets Schedule field to given value. + + +### GetScope + +`func (o *CreateMaintenanceWindow200Response) GetScope() CreateMaintenanceWindowRequestScope` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *CreateMaintenanceWindow200Response) GetScopeOk() (*CreateMaintenanceWindowRequestScope, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *CreateMaintenanceWindow200Response) SetScope(v CreateMaintenanceWindowRequestScope)` + +SetScope sets Scope field to given value. + +### HasScope + +`func (o *CreateMaintenanceWindow200Response) HasScope() bool` + +HasScope returns a boolean if a field has been set. + +### GetStatus + +`func (o *CreateMaintenanceWindow200Response) GetStatus() interface{}` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *CreateMaintenanceWindow200Response) GetStatusOk() (*interface{}, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *CreateMaintenanceWindow200Response) SetStatus(v interface{})` + +SetStatus sets Status field to given value. + + +### SetStatusNil + +`func (o *CreateMaintenanceWindow200Response) SetStatusNil(b bool)` + + SetStatusNil sets the value for Status to be an explicit nil + +### UnsetStatus +`func (o *CreateMaintenanceWindow200Response) UnsetStatus()` + +UnsetStatus ensures that no value is present for Status, not even an explicit nil +### GetTitle + +`func (o *CreateMaintenanceWindow200Response) GetTitle() interface{}` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *CreateMaintenanceWindow200Response) GetTitleOk() (*interface{}, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *CreateMaintenanceWindow200Response) SetTitle(v interface{})` + +SetTitle sets Title field to given value. + + +### SetTitleNil + +`func (o *CreateMaintenanceWindow200Response) SetTitleNil(b bool)` + + SetTitleNil sets the value for Title to be an explicit nil + +### UnsetTitle +`func (o *CreateMaintenanceWindow200Response) UnsetTitle()` + +UnsetTitle ensures that no value is present for Title, not even an explicit nil +### GetUpdatedAt + +`func (o *CreateMaintenanceWindow200Response) GetUpdatedAt() interface{}` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *CreateMaintenanceWindow200Response) GetUpdatedAtOk() (*interface{}, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *CreateMaintenanceWindow200Response) SetUpdatedAt(v interface{})` + +SetUpdatedAt sets UpdatedAt field to given value. + + +### SetUpdatedAtNil + +`func (o *CreateMaintenanceWindow200Response) SetUpdatedAtNil(b bool)` + + SetUpdatedAtNil sets the value for UpdatedAt to be an explicit nil + +### UnsetUpdatedAt +`func (o *CreateMaintenanceWindow200Response) UnsetUpdatedAt()` + +UnsetUpdatedAt ensures that no value is present for UpdatedAt, not even an explicit nil +### GetUpdatedBy + +`func (o *CreateMaintenanceWindow200Response) GetUpdatedBy() interface{}` + +GetUpdatedBy returns the UpdatedBy field if non-nil, zero value otherwise. + +### GetUpdatedByOk + +`func (o *CreateMaintenanceWindow200Response) GetUpdatedByOk() (*interface{}, bool)` + +GetUpdatedByOk returns a tuple with the UpdatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedBy + +`func (o *CreateMaintenanceWindow200Response) SetUpdatedBy(v interface{})` + +SetUpdatedBy sets UpdatedBy field to given value. + + +### SetUpdatedByNil + +`func (o *CreateMaintenanceWindow200Response) SetUpdatedByNil(b bool)` + + SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil + +### UnsetUpdatedBy +`func (o *CreateMaintenanceWindow200Response) UnsetUpdatedBy()` + +UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/CreateMaintenanceWindow200ResponseSchedule.md b/generated/alerting/docs/CreateMaintenanceWindow200ResponseSchedule.md new file mode 100644 index 000000000..25ba50394 --- /dev/null +++ b/generated/alerting/docs/CreateMaintenanceWindow200ResponseSchedule.md @@ -0,0 +1,51 @@ +# CreateMaintenanceWindow200ResponseSchedule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Custom** | [**CreateMaintenanceWindow200ResponseScheduleCustom**](CreateMaintenanceWindow200ResponseScheduleCustom.md) | | + +## Methods + +### NewCreateMaintenanceWindow200ResponseSchedule + +`func NewCreateMaintenanceWindow200ResponseSchedule(custom CreateMaintenanceWindow200ResponseScheduleCustom, ) *CreateMaintenanceWindow200ResponseSchedule` + +NewCreateMaintenanceWindow200ResponseSchedule instantiates a new CreateMaintenanceWindow200ResponseSchedule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateMaintenanceWindow200ResponseScheduleWithDefaults + +`func NewCreateMaintenanceWindow200ResponseScheduleWithDefaults() *CreateMaintenanceWindow200ResponseSchedule` + +NewCreateMaintenanceWindow200ResponseScheduleWithDefaults instantiates a new CreateMaintenanceWindow200ResponseSchedule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCustom + +`func (o *CreateMaintenanceWindow200ResponseSchedule) GetCustom() CreateMaintenanceWindow200ResponseScheduleCustom` + +GetCustom returns the Custom field if non-nil, zero value otherwise. + +### GetCustomOk + +`func (o *CreateMaintenanceWindow200ResponseSchedule) GetCustomOk() (*CreateMaintenanceWindow200ResponseScheduleCustom, bool)` + +GetCustomOk returns a tuple with the Custom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustom + +`func (o *CreateMaintenanceWindow200ResponseSchedule) SetCustom(v CreateMaintenanceWindow200ResponseScheduleCustom)` + +SetCustom sets Custom field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/CreateMaintenanceWindow200ResponseScheduleCustom.md b/generated/alerting/docs/CreateMaintenanceWindow200ResponseScheduleCustom.md new file mode 100644 index 000000000..256e26fed --- /dev/null +++ b/generated/alerting/docs/CreateMaintenanceWindow200ResponseScheduleCustom.md @@ -0,0 +1,154 @@ +# CreateMaintenanceWindow200ResponseScheduleCustom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Duration** | **interface{}** | The duration of the schedule. It allows values in `<integer><unit>` format. `<unit>` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`. | +**Recurring** | Pointer to [**CreateMaintenanceWindow200ResponseScheduleCustomRecurring**](CreateMaintenanceWindow200ResponseScheduleCustomRecurring.md) | | [optional] +**Start** | **interface{}** | The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`. | +**Timezone** | Pointer to **interface{}** | The timezone of the schedule. The default timezone is UTC. | [optional] + +## Methods + +### NewCreateMaintenanceWindow200ResponseScheduleCustom + +`func NewCreateMaintenanceWindow200ResponseScheduleCustom(duration interface{}, start interface{}, ) *CreateMaintenanceWindow200ResponseScheduleCustom` + +NewCreateMaintenanceWindow200ResponseScheduleCustom instantiates a new CreateMaintenanceWindow200ResponseScheduleCustom object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateMaintenanceWindow200ResponseScheduleCustomWithDefaults + +`func NewCreateMaintenanceWindow200ResponseScheduleCustomWithDefaults() *CreateMaintenanceWindow200ResponseScheduleCustom` + +NewCreateMaintenanceWindow200ResponseScheduleCustomWithDefaults instantiates a new CreateMaintenanceWindow200ResponseScheduleCustom object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDuration + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) GetDuration() interface{}` + +GetDuration returns the Duration field if non-nil, zero value otherwise. + +### GetDurationOk + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) GetDurationOk() (*interface{}, bool)` + +GetDurationOk returns a tuple with the Duration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDuration + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) SetDuration(v interface{})` + +SetDuration sets Duration field to given value. + + +### SetDurationNil + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) SetDurationNil(b bool)` + + SetDurationNil sets the value for Duration to be an explicit nil + +### UnsetDuration +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) UnsetDuration()` + +UnsetDuration ensures that no value is present for Duration, not even an explicit nil +### GetRecurring + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) GetRecurring() CreateMaintenanceWindow200ResponseScheduleCustomRecurring` + +GetRecurring returns the Recurring field if non-nil, zero value otherwise. + +### GetRecurringOk + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) GetRecurringOk() (*CreateMaintenanceWindow200ResponseScheduleCustomRecurring, bool)` + +GetRecurringOk returns a tuple with the Recurring field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurring + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) SetRecurring(v CreateMaintenanceWindow200ResponseScheduleCustomRecurring)` + +SetRecurring sets Recurring field to given value. + +### HasRecurring + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) HasRecurring() bool` + +HasRecurring returns a boolean if a field has been set. + +### GetStart + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) GetStart() interface{}` + +GetStart returns the Start field if non-nil, zero value otherwise. + +### GetStartOk + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) GetStartOk() (*interface{}, bool)` + +GetStartOk returns a tuple with the Start field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStart + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) SetStart(v interface{})` + +SetStart sets Start field to given value. + + +### SetStartNil + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) SetStartNil(b bool)` + + SetStartNil sets the value for Start to be an explicit nil + +### UnsetStart +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) UnsetStart()` + +UnsetStart ensures that no value is present for Start, not even an explicit nil +### GetTimezone + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) GetTimezone() interface{}` + +GetTimezone returns the Timezone field if non-nil, zero value otherwise. + +### GetTimezoneOk + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) GetTimezoneOk() (*interface{}, bool)` + +GetTimezoneOk returns a tuple with the Timezone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimezone + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) SetTimezone(v interface{})` + +SetTimezone sets Timezone field to given value. + +### HasTimezone + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) HasTimezone() bool` + +HasTimezone returns a boolean if a field has been set. + +### SetTimezoneNil + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) SetTimezoneNil(b bool)` + + SetTimezoneNil sets the value for Timezone to be an explicit nil + +### UnsetTimezone +`func (o *CreateMaintenanceWindow200ResponseScheduleCustom) UnsetTimezone()` + +UnsetTimezone ensures that no value is present for Timezone, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/CreateMaintenanceWindow200ResponseScheduleCustomRecurring.md b/generated/alerting/docs/CreateMaintenanceWindow200ResponseScheduleCustomRecurring.md new file mode 100644 index 000000000..eed7f0105 --- /dev/null +++ b/generated/alerting/docs/CreateMaintenanceWindow200ResponseScheduleCustomRecurring.md @@ -0,0 +1,246 @@ +# CreateMaintenanceWindow200ResponseScheduleCustomRecurring + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | Pointer to **interface{}** | The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`. | [optional] +**Every** | Pointer to **interface{}** | The interval and frequency of a recurring schedule. It allows values in `<integer><unit>` format. `<unit>` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`. | [optional] +**Occurrences** | Pointer to **interface{}** | The total number of recurrences of the schedule. | [optional] +**OnMonth** | Pointer to **interface{}** | The specific months for a recurring schedule. Valid values are 1-12. | [optional] +**OnMonthDay** | Pointer to **interface{}** | The specific days of the month for a recurring schedule. Valid values are 1-31. | [optional] +**OnWeekDay** | Pointer to **interface{}** | The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule. | [optional] + +## Methods + +### NewCreateMaintenanceWindow200ResponseScheduleCustomRecurring + +`func NewCreateMaintenanceWindow200ResponseScheduleCustomRecurring() *CreateMaintenanceWindow200ResponseScheduleCustomRecurring` + +NewCreateMaintenanceWindow200ResponseScheduleCustomRecurring instantiates a new CreateMaintenanceWindow200ResponseScheduleCustomRecurring object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateMaintenanceWindow200ResponseScheduleCustomRecurringWithDefaults + +`func NewCreateMaintenanceWindow200ResponseScheduleCustomRecurringWithDefaults() *CreateMaintenanceWindow200ResponseScheduleCustomRecurring` + +NewCreateMaintenanceWindow200ResponseScheduleCustomRecurringWithDefaults instantiates a new CreateMaintenanceWindow200ResponseScheduleCustomRecurring object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnd + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetEnd() interface{}` + +GetEnd returns the End field if non-nil, zero value otherwise. + +### GetEndOk + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetEndOk() (*interface{}, bool)` + +GetEndOk returns a tuple with the End field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnd + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetEnd(v interface{})` + +SetEnd sets End field to given value. + +### HasEnd + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) HasEnd() bool` + +HasEnd returns a boolean if a field has been set. + +### SetEndNil + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetEndNil(b bool)` + + SetEndNil sets the value for End to be an explicit nil + +### UnsetEnd +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) UnsetEnd()` + +UnsetEnd ensures that no value is present for End, not even an explicit nil +### GetEvery + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetEvery() interface{}` + +GetEvery returns the Every field if non-nil, zero value otherwise. + +### GetEveryOk + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetEveryOk() (*interface{}, bool)` + +GetEveryOk returns a tuple with the Every field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEvery + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetEvery(v interface{})` + +SetEvery sets Every field to given value. + +### HasEvery + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) HasEvery() bool` + +HasEvery returns a boolean if a field has been set. + +### SetEveryNil + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetEveryNil(b bool)` + + SetEveryNil sets the value for Every to be an explicit nil + +### UnsetEvery +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) UnsetEvery()` + +UnsetEvery ensures that no value is present for Every, not even an explicit nil +### GetOccurrences + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetOccurrences() interface{}` + +GetOccurrences returns the Occurrences field if non-nil, zero value otherwise. + +### GetOccurrencesOk + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetOccurrencesOk() (*interface{}, bool)` + +GetOccurrencesOk returns a tuple with the Occurrences field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOccurrences + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetOccurrences(v interface{})` + +SetOccurrences sets Occurrences field to given value. + +### HasOccurrences + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) HasOccurrences() bool` + +HasOccurrences returns a boolean if a field has been set. + +### SetOccurrencesNil + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetOccurrencesNil(b bool)` + + SetOccurrencesNil sets the value for Occurrences to be an explicit nil + +### UnsetOccurrences +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) UnsetOccurrences()` + +UnsetOccurrences ensures that no value is present for Occurrences, not even an explicit nil +### GetOnMonth + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnMonth() interface{}` + +GetOnMonth returns the OnMonth field if non-nil, zero value otherwise. + +### GetOnMonthOk + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnMonthOk() (*interface{}, bool)` + +GetOnMonthOk returns a tuple with the OnMonth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnMonth + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnMonth(v interface{})` + +SetOnMonth sets OnMonth field to given value. + +### HasOnMonth + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) HasOnMonth() bool` + +HasOnMonth returns a boolean if a field has been set. + +### SetOnMonthNil + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnMonthNil(b bool)` + + SetOnMonthNil sets the value for OnMonth to be an explicit nil + +### UnsetOnMonth +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) UnsetOnMonth()` + +UnsetOnMonth ensures that no value is present for OnMonth, not even an explicit nil +### GetOnMonthDay + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnMonthDay() interface{}` + +GetOnMonthDay returns the OnMonthDay field if non-nil, zero value otherwise. + +### GetOnMonthDayOk + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnMonthDayOk() (*interface{}, bool)` + +GetOnMonthDayOk returns a tuple with the OnMonthDay field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnMonthDay + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnMonthDay(v interface{})` + +SetOnMonthDay sets OnMonthDay field to given value. + +### HasOnMonthDay + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) HasOnMonthDay() bool` + +HasOnMonthDay returns a boolean if a field has been set. + +### SetOnMonthDayNil + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnMonthDayNil(b bool)` + + SetOnMonthDayNil sets the value for OnMonthDay to be an explicit nil + +### UnsetOnMonthDay +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) UnsetOnMonthDay()` + +UnsetOnMonthDay ensures that no value is present for OnMonthDay, not even an explicit nil +### GetOnWeekDay + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnWeekDay() interface{}` + +GetOnWeekDay returns the OnWeekDay field if non-nil, zero value otherwise. + +### GetOnWeekDayOk + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnWeekDayOk() (*interface{}, bool)` + +GetOnWeekDayOk returns a tuple with the OnWeekDay field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnWeekDay + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnWeekDay(v interface{})` + +SetOnWeekDay sets OnWeekDay field to given value. + +### HasOnWeekDay + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) HasOnWeekDay() bool` + +HasOnWeekDay returns a boolean if a field has been set. + +### SetOnWeekDayNil + +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnWeekDayNil(b bool)` + + SetOnWeekDayNil sets the value for OnWeekDay to be an explicit nil + +### UnsetOnWeekDay +`func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) UnsetOnWeekDay()` + +UnsetOnWeekDay ensures that no value is present for OnWeekDay, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/CreateMaintenanceWindowRequest.md b/generated/alerting/docs/CreateMaintenanceWindowRequest.md new file mode 100644 index 000000000..8832ec1f1 --- /dev/null +++ b/generated/alerting/docs/CreateMaintenanceWindowRequest.md @@ -0,0 +1,124 @@ +# CreateMaintenanceWindowRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. | [optional] +**Schedule** | [**CreateMaintenanceWindowRequestSchedule**](CreateMaintenanceWindowRequestSchedule.md) | | +**Scope** | Pointer to [**CreateMaintenanceWindowRequestScope**](CreateMaintenanceWindowRequestScope.md) | | [optional] +**Title** | **string** | The name of the maintenance window. While this name does not have to be unique, a distinctive name can help you identify a specific maintenance window. | + +## Methods + +### NewCreateMaintenanceWindowRequest + +`func NewCreateMaintenanceWindowRequest(schedule CreateMaintenanceWindowRequestSchedule, title string, ) *CreateMaintenanceWindowRequest` + +NewCreateMaintenanceWindowRequest instantiates a new CreateMaintenanceWindowRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateMaintenanceWindowRequestWithDefaults + +`func NewCreateMaintenanceWindowRequestWithDefaults() *CreateMaintenanceWindowRequest` + +NewCreateMaintenanceWindowRequestWithDefaults instantiates a new CreateMaintenanceWindowRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *CreateMaintenanceWindowRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *CreateMaintenanceWindowRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *CreateMaintenanceWindowRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *CreateMaintenanceWindowRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetSchedule + +`func (o *CreateMaintenanceWindowRequest) GetSchedule() CreateMaintenanceWindowRequestSchedule` + +GetSchedule returns the Schedule field if non-nil, zero value otherwise. + +### GetScheduleOk + +`func (o *CreateMaintenanceWindowRequest) GetScheduleOk() (*CreateMaintenanceWindowRequestSchedule, bool)` + +GetScheduleOk returns a tuple with the Schedule field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSchedule + +`func (o *CreateMaintenanceWindowRequest) SetSchedule(v CreateMaintenanceWindowRequestSchedule)` + +SetSchedule sets Schedule field to given value. + + +### GetScope + +`func (o *CreateMaintenanceWindowRequest) GetScope() CreateMaintenanceWindowRequestScope` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *CreateMaintenanceWindowRequest) GetScopeOk() (*CreateMaintenanceWindowRequestScope, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *CreateMaintenanceWindowRequest) SetScope(v CreateMaintenanceWindowRequestScope)` + +SetScope sets Scope field to given value. + +### HasScope + +`func (o *CreateMaintenanceWindowRequest) HasScope() bool` + +HasScope returns a boolean if a field has been set. + +### GetTitle + +`func (o *CreateMaintenanceWindowRequest) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *CreateMaintenanceWindowRequest) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *CreateMaintenanceWindowRequest) SetTitle(v string)` + +SetTitle sets Title field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/CreateMaintenanceWindowRequestSchedule.md b/generated/alerting/docs/CreateMaintenanceWindowRequestSchedule.md new file mode 100644 index 000000000..6eb0d4599 --- /dev/null +++ b/generated/alerting/docs/CreateMaintenanceWindowRequestSchedule.md @@ -0,0 +1,51 @@ +# CreateMaintenanceWindowRequestSchedule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Custom** | [**CreateMaintenanceWindowRequestScheduleCustom**](CreateMaintenanceWindowRequestScheduleCustom.md) | | + +## Methods + +### NewCreateMaintenanceWindowRequestSchedule + +`func NewCreateMaintenanceWindowRequestSchedule(custom CreateMaintenanceWindowRequestScheduleCustom, ) *CreateMaintenanceWindowRequestSchedule` + +NewCreateMaintenanceWindowRequestSchedule instantiates a new CreateMaintenanceWindowRequestSchedule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateMaintenanceWindowRequestScheduleWithDefaults + +`func NewCreateMaintenanceWindowRequestScheduleWithDefaults() *CreateMaintenanceWindowRequestSchedule` + +NewCreateMaintenanceWindowRequestScheduleWithDefaults instantiates a new CreateMaintenanceWindowRequestSchedule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCustom + +`func (o *CreateMaintenanceWindowRequestSchedule) GetCustom() CreateMaintenanceWindowRequestScheduleCustom` + +GetCustom returns the Custom field if non-nil, zero value otherwise. + +### GetCustomOk + +`func (o *CreateMaintenanceWindowRequestSchedule) GetCustomOk() (*CreateMaintenanceWindowRequestScheduleCustom, bool)` + +GetCustomOk returns a tuple with the Custom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustom + +`func (o *CreateMaintenanceWindowRequestSchedule) SetCustom(v CreateMaintenanceWindowRequestScheduleCustom)` + +SetCustom sets Custom field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/CreateMaintenanceWindowRequestScheduleCustom.md b/generated/alerting/docs/CreateMaintenanceWindowRequestScheduleCustom.md new file mode 100644 index 000000000..837f85df4 --- /dev/null +++ b/generated/alerting/docs/CreateMaintenanceWindowRequestScheduleCustom.md @@ -0,0 +1,124 @@ +# CreateMaintenanceWindowRequestScheduleCustom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Duration** | **string** | The duration of the schedule. It allows values in `<integer><unit>` format. `<unit>` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`. | +**Recurring** | Pointer to [**CreateMaintenanceWindowRequestScheduleCustomRecurring**](CreateMaintenanceWindowRequestScheduleCustomRecurring.md) | | [optional] +**Start** | **string** | The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`. | +**Timezone** | Pointer to **string** | The timezone of the schedule. The default timezone is UTC. | [optional] + +## Methods + +### NewCreateMaintenanceWindowRequestScheduleCustom + +`func NewCreateMaintenanceWindowRequestScheduleCustom(duration string, start string, ) *CreateMaintenanceWindowRequestScheduleCustom` + +NewCreateMaintenanceWindowRequestScheduleCustom instantiates a new CreateMaintenanceWindowRequestScheduleCustom object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateMaintenanceWindowRequestScheduleCustomWithDefaults + +`func NewCreateMaintenanceWindowRequestScheduleCustomWithDefaults() *CreateMaintenanceWindowRequestScheduleCustom` + +NewCreateMaintenanceWindowRequestScheduleCustomWithDefaults instantiates a new CreateMaintenanceWindowRequestScheduleCustom object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDuration + +`func (o *CreateMaintenanceWindowRequestScheduleCustom) GetDuration() string` + +GetDuration returns the Duration field if non-nil, zero value otherwise. + +### GetDurationOk + +`func (o *CreateMaintenanceWindowRequestScheduleCustom) GetDurationOk() (*string, bool)` + +GetDurationOk returns a tuple with the Duration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDuration + +`func (o *CreateMaintenanceWindowRequestScheduleCustom) SetDuration(v string)` + +SetDuration sets Duration field to given value. + + +### GetRecurring + +`func (o *CreateMaintenanceWindowRequestScheduleCustom) GetRecurring() CreateMaintenanceWindowRequestScheduleCustomRecurring` + +GetRecurring returns the Recurring field if non-nil, zero value otherwise. + +### GetRecurringOk + +`func (o *CreateMaintenanceWindowRequestScheduleCustom) GetRecurringOk() (*CreateMaintenanceWindowRequestScheduleCustomRecurring, bool)` + +GetRecurringOk returns a tuple with the Recurring field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurring + +`func (o *CreateMaintenanceWindowRequestScheduleCustom) SetRecurring(v CreateMaintenanceWindowRequestScheduleCustomRecurring)` + +SetRecurring sets Recurring field to given value. + +### HasRecurring + +`func (o *CreateMaintenanceWindowRequestScheduleCustom) HasRecurring() bool` + +HasRecurring returns a boolean if a field has been set. + +### GetStart + +`func (o *CreateMaintenanceWindowRequestScheduleCustom) GetStart() string` + +GetStart returns the Start field if non-nil, zero value otherwise. + +### GetStartOk + +`func (o *CreateMaintenanceWindowRequestScheduleCustom) GetStartOk() (*string, bool)` + +GetStartOk returns a tuple with the Start field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStart + +`func (o *CreateMaintenanceWindowRequestScheduleCustom) SetStart(v string)` + +SetStart sets Start field to given value. + + +### GetTimezone + +`func (o *CreateMaintenanceWindowRequestScheduleCustom) GetTimezone() string` + +GetTimezone returns the Timezone field if non-nil, zero value otherwise. + +### GetTimezoneOk + +`func (o *CreateMaintenanceWindowRequestScheduleCustom) GetTimezoneOk() (*string, bool)` + +GetTimezoneOk returns a tuple with the Timezone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimezone + +`func (o *CreateMaintenanceWindowRequestScheduleCustom) SetTimezone(v string)` + +SetTimezone sets Timezone field to given value. + +### HasTimezone + +`func (o *CreateMaintenanceWindowRequestScheduleCustom) HasTimezone() bool` + +HasTimezone returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/CreateMaintenanceWindowRequestScheduleCustomRecurring.md b/generated/alerting/docs/CreateMaintenanceWindowRequestScheduleCustomRecurring.md new file mode 100644 index 000000000..4cb12baff --- /dev/null +++ b/generated/alerting/docs/CreateMaintenanceWindowRequestScheduleCustomRecurring.md @@ -0,0 +1,186 @@ +# CreateMaintenanceWindowRequestScheduleCustomRecurring + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | Pointer to **string** | The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`. | [optional] +**Every** | Pointer to **string** | The interval and frequency of a recurring schedule. It allows values in `<integer><unit>` format. `<unit>` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`. | [optional] +**Occurrences** | Pointer to **float32** | The total number of recurrences of the schedule. | [optional] +**OnMonth** | Pointer to **[]float32** | | [optional] +**OnMonthDay** | Pointer to **[]float32** | | [optional] +**OnWeekDay** | Pointer to **[]string** | | [optional] + +## Methods + +### NewCreateMaintenanceWindowRequestScheduleCustomRecurring + +`func NewCreateMaintenanceWindowRequestScheduleCustomRecurring() *CreateMaintenanceWindowRequestScheduleCustomRecurring` + +NewCreateMaintenanceWindowRequestScheduleCustomRecurring instantiates a new CreateMaintenanceWindowRequestScheduleCustomRecurring object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateMaintenanceWindowRequestScheduleCustomRecurringWithDefaults + +`func NewCreateMaintenanceWindowRequestScheduleCustomRecurringWithDefaults() *CreateMaintenanceWindowRequestScheduleCustomRecurring` + +NewCreateMaintenanceWindowRequestScheduleCustomRecurringWithDefaults instantiates a new CreateMaintenanceWindowRequestScheduleCustomRecurring object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnd + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetEnd() string` + +GetEnd returns the End field if non-nil, zero value otherwise. + +### GetEndOk + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetEndOk() (*string, bool)` + +GetEndOk returns a tuple with the End field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnd + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) SetEnd(v string)` + +SetEnd sets End field to given value. + +### HasEnd + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) HasEnd() bool` + +HasEnd returns a boolean if a field has been set. + +### GetEvery + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetEvery() string` + +GetEvery returns the Every field if non-nil, zero value otherwise. + +### GetEveryOk + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetEveryOk() (*string, bool)` + +GetEveryOk returns a tuple with the Every field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEvery + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) SetEvery(v string)` + +SetEvery sets Every field to given value. + +### HasEvery + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) HasEvery() bool` + +HasEvery returns a boolean if a field has been set. + +### GetOccurrences + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetOccurrences() float32` + +GetOccurrences returns the Occurrences field if non-nil, zero value otherwise. + +### GetOccurrencesOk + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetOccurrencesOk() (*float32, bool)` + +GetOccurrencesOk returns a tuple with the Occurrences field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOccurrences + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) SetOccurrences(v float32)` + +SetOccurrences sets Occurrences field to given value. + +### HasOccurrences + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) HasOccurrences() bool` + +HasOccurrences returns a boolean if a field has been set. + +### GetOnMonth + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonth() []float32` + +GetOnMonth returns the OnMonth field if non-nil, zero value otherwise. + +### GetOnMonthOk + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthOk() (*[]float32, bool)` + +GetOnMonthOk returns a tuple with the OnMonth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnMonth + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) SetOnMonth(v []float32)` + +SetOnMonth sets OnMonth field to given value. + +### HasOnMonth + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) HasOnMonth() bool` + +HasOnMonth returns a boolean if a field has been set. + +### GetOnMonthDay + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthDay() []float32` + +GetOnMonthDay returns the OnMonthDay field if non-nil, zero value otherwise. + +### GetOnMonthDayOk + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthDayOk() (*[]float32, bool)` + +GetOnMonthDayOk returns a tuple with the OnMonthDay field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnMonthDay + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) SetOnMonthDay(v []float32)` + +SetOnMonthDay sets OnMonthDay field to given value. + +### HasOnMonthDay + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) HasOnMonthDay() bool` + +HasOnMonthDay returns a boolean if a field has been set. + +### GetOnWeekDay + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetOnWeekDay() []string` + +GetOnWeekDay returns the OnWeekDay field if non-nil, zero value otherwise. + +### GetOnWeekDayOk + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetOnWeekDayOk() (*[]string, bool)` + +GetOnWeekDayOk returns a tuple with the OnWeekDay field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnWeekDay + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) SetOnWeekDay(v []string)` + +SetOnWeekDay sets OnWeekDay field to given value. + +### HasOnWeekDay + +`func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) HasOnWeekDay() bool` + +HasOnWeekDay returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/CreateMaintenanceWindowRequestScope.md b/generated/alerting/docs/CreateMaintenanceWindowRequestScope.md new file mode 100644 index 000000000..becc75ac0 --- /dev/null +++ b/generated/alerting/docs/CreateMaintenanceWindowRequestScope.md @@ -0,0 +1,51 @@ +# CreateMaintenanceWindowRequestScope + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Alerting** | [**CreateMaintenanceWindowRequestScopeAlerting**](CreateMaintenanceWindowRequestScopeAlerting.md) | | + +## Methods + +### NewCreateMaintenanceWindowRequestScope + +`func NewCreateMaintenanceWindowRequestScope(alerting CreateMaintenanceWindowRequestScopeAlerting, ) *CreateMaintenanceWindowRequestScope` + +NewCreateMaintenanceWindowRequestScope instantiates a new CreateMaintenanceWindowRequestScope object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateMaintenanceWindowRequestScopeWithDefaults + +`func NewCreateMaintenanceWindowRequestScopeWithDefaults() *CreateMaintenanceWindowRequestScope` + +NewCreateMaintenanceWindowRequestScopeWithDefaults instantiates a new CreateMaintenanceWindowRequestScope object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAlerting + +`func (o *CreateMaintenanceWindowRequestScope) GetAlerting() CreateMaintenanceWindowRequestScopeAlerting` + +GetAlerting returns the Alerting field if non-nil, zero value otherwise. + +### GetAlertingOk + +`func (o *CreateMaintenanceWindowRequestScope) GetAlertingOk() (*CreateMaintenanceWindowRequestScopeAlerting, bool)` + +GetAlertingOk returns a tuple with the Alerting field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlerting + +`func (o *CreateMaintenanceWindowRequestScope) SetAlerting(v CreateMaintenanceWindowRequestScopeAlerting)` + +SetAlerting sets Alerting field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/CreateMaintenanceWindowRequestScopeAlerting.md b/generated/alerting/docs/CreateMaintenanceWindowRequestScopeAlerting.md new file mode 100644 index 000000000..a4873d9df --- /dev/null +++ b/generated/alerting/docs/CreateMaintenanceWindowRequestScopeAlerting.md @@ -0,0 +1,51 @@ +# CreateMaintenanceWindowRequestScopeAlerting + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Query** | [**CreateMaintenanceWindowRequestScopeAlertingQuery**](CreateMaintenanceWindowRequestScopeAlertingQuery.md) | | + +## Methods + +### NewCreateMaintenanceWindowRequestScopeAlerting + +`func NewCreateMaintenanceWindowRequestScopeAlerting(query CreateMaintenanceWindowRequestScopeAlertingQuery, ) *CreateMaintenanceWindowRequestScopeAlerting` + +NewCreateMaintenanceWindowRequestScopeAlerting instantiates a new CreateMaintenanceWindowRequestScopeAlerting object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateMaintenanceWindowRequestScopeAlertingWithDefaults + +`func NewCreateMaintenanceWindowRequestScopeAlertingWithDefaults() *CreateMaintenanceWindowRequestScopeAlerting` + +NewCreateMaintenanceWindowRequestScopeAlertingWithDefaults instantiates a new CreateMaintenanceWindowRequestScopeAlerting object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetQuery + +`func (o *CreateMaintenanceWindowRequestScopeAlerting) GetQuery() CreateMaintenanceWindowRequestScopeAlertingQuery` + +GetQuery returns the Query field if non-nil, zero value otherwise. + +### GetQueryOk + +`func (o *CreateMaintenanceWindowRequestScopeAlerting) GetQueryOk() (*CreateMaintenanceWindowRequestScopeAlertingQuery, bool)` + +GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuery + +`func (o *CreateMaintenanceWindowRequestScopeAlerting) SetQuery(v CreateMaintenanceWindowRequestScopeAlertingQuery)` + +SetQuery sets Query field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/CreateMaintenanceWindowRequestScopeAlertingQuery.md b/generated/alerting/docs/CreateMaintenanceWindowRequestScopeAlertingQuery.md new file mode 100644 index 000000000..260eddd46 --- /dev/null +++ b/generated/alerting/docs/CreateMaintenanceWindowRequestScopeAlertingQuery.md @@ -0,0 +1,51 @@ +# CreateMaintenanceWindowRequestScopeAlertingQuery + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kql** | **string** | A filter written in Kibana Query Language (KQL). | + +## Methods + +### NewCreateMaintenanceWindowRequestScopeAlertingQuery + +`func NewCreateMaintenanceWindowRequestScopeAlertingQuery(kql string, ) *CreateMaintenanceWindowRequestScopeAlertingQuery` + +NewCreateMaintenanceWindowRequestScopeAlertingQuery instantiates a new CreateMaintenanceWindowRequestScopeAlertingQuery object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateMaintenanceWindowRequestScopeAlertingQueryWithDefaults + +`func NewCreateMaintenanceWindowRequestScopeAlertingQueryWithDefaults() *CreateMaintenanceWindowRequestScopeAlertingQuery` + +NewCreateMaintenanceWindowRequestScopeAlertingQueryWithDefaults instantiates a new CreateMaintenanceWindowRequestScopeAlertingQuery object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetKql + +`func (o *CreateMaintenanceWindowRequestScopeAlertingQuery) GetKql() string` + +GetKql returns the Kql field if non-nil, zero value otherwise. + +### GetKqlOk + +`func (o *CreateMaintenanceWindowRequestScopeAlertingQuery) GetKqlOk() (*string, bool)` + +GetKqlOk returns a tuple with the Kql field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKql + +`func (o *CreateMaintenanceWindowRequestScopeAlertingQuery) SetKql(v string)` + +SetKql sets Kql field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/FieldmapProperties.md b/generated/alerting/docs/FieldmapProperties.md index 32d32a814..44be8e76a 100644 --- a/generated/alerting/docs/FieldmapProperties.md +++ b/generated/alerting/docs/FieldmapProperties.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **Path** | Pointer to **string** | TBD | [optional] **Properties** | Pointer to | Details about the object properties. This property is applicable when `type` is `object`. | [optional] **Required** | Pointer to **bool** | Indicates whether the field is required. | [optional] -**ScalingFactor** | Pointer to **int32** | The scaling factor to use when encoding values. This property is applicable when `type` is `scaled_float`. Values will be multiplied by this factor at index time and rounded to the closest long value. | [optional] +**ScalingFactor** | Pointer to **int32** | The scaling factor to use when encoding values. This property is applicable when `type` is `scaled_float`. Values will be multiplied by this factor at index time and rounded to the closest long value. | [optional] **Type** | Pointer to **string** | Specifies the data type for the field. | [optional] ## Methods diff --git a/generated/alerting/docs/MaintenanceWindowResponseProperties.md b/generated/alerting/docs/MaintenanceWindowResponseProperties.md new file mode 100644 index 000000000..7e0c30a88 --- /dev/null +++ b/generated/alerting/docs/MaintenanceWindowResponseProperties.md @@ -0,0 +1,245 @@ +# MaintenanceWindowResponseProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **string** | The date and time when the maintenance window was created. | +**CreatedBy** | **string** | The identifier for the user that created the maintenance window. | +**Enabled** | **bool** | Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. | +**Id** | **string** | The identifier for the maintenance window. | +**Schedule** | [**MaintenanceWindowResponsePropertiesSchedule**](MaintenanceWindowResponsePropertiesSchedule.md) | | +**Scope** | Pointer to [**MaintenanceWindowResponsePropertiesScope**](MaintenanceWindowResponsePropertiesScope.md) | | [optional] +**Status** | **string** | The current status of the maintenance window. | +**Title** | **string** | The name of the maintenance window. | +**UpdatedAt** | **string** | The date and time when the maintenance window was last updated. | +**UpdatedBy** | **string** | The identifier for the user that last updated this maintenance window. | + +## Methods + +### NewMaintenanceWindowResponseProperties + +`func NewMaintenanceWindowResponseProperties(createdAt string, createdBy string, enabled bool, id string, schedule MaintenanceWindowResponsePropertiesSchedule, status string, title string, updatedAt string, updatedBy string, ) *MaintenanceWindowResponseProperties` + +NewMaintenanceWindowResponseProperties instantiates a new MaintenanceWindowResponseProperties object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMaintenanceWindowResponsePropertiesWithDefaults + +`func NewMaintenanceWindowResponsePropertiesWithDefaults() *MaintenanceWindowResponseProperties` + +NewMaintenanceWindowResponsePropertiesWithDefaults instantiates a new MaintenanceWindowResponseProperties object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCreatedAt + +`func (o *MaintenanceWindowResponseProperties) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *MaintenanceWindowResponseProperties) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *MaintenanceWindowResponseProperties) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + + +### GetCreatedBy + +`func (o *MaintenanceWindowResponseProperties) GetCreatedBy() string` + +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. + +### GetCreatedByOk + +`func (o *MaintenanceWindowResponseProperties) GetCreatedByOk() (*string, bool)` + +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedBy + +`func (o *MaintenanceWindowResponseProperties) SetCreatedBy(v string)` + +SetCreatedBy sets CreatedBy field to given value. + + +### GetEnabled + +`func (o *MaintenanceWindowResponseProperties) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *MaintenanceWindowResponseProperties) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *MaintenanceWindowResponseProperties) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + + +### GetId + +`func (o *MaintenanceWindowResponseProperties) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *MaintenanceWindowResponseProperties) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *MaintenanceWindowResponseProperties) SetId(v string)` + +SetId sets Id field to given value. + + +### GetSchedule + +`func (o *MaintenanceWindowResponseProperties) GetSchedule() MaintenanceWindowResponsePropertiesSchedule` + +GetSchedule returns the Schedule field if non-nil, zero value otherwise. + +### GetScheduleOk + +`func (o *MaintenanceWindowResponseProperties) GetScheduleOk() (*MaintenanceWindowResponsePropertiesSchedule, bool)` + +GetScheduleOk returns a tuple with the Schedule field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSchedule + +`func (o *MaintenanceWindowResponseProperties) SetSchedule(v MaintenanceWindowResponsePropertiesSchedule)` + +SetSchedule sets Schedule field to given value. + + +### GetScope + +`func (o *MaintenanceWindowResponseProperties) GetScope() MaintenanceWindowResponsePropertiesScope` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *MaintenanceWindowResponseProperties) GetScopeOk() (*MaintenanceWindowResponsePropertiesScope, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *MaintenanceWindowResponseProperties) SetScope(v MaintenanceWindowResponsePropertiesScope)` + +SetScope sets Scope field to given value. + +### HasScope + +`func (o *MaintenanceWindowResponseProperties) HasScope() bool` + +HasScope returns a boolean if a field has been set. + +### GetStatus + +`func (o *MaintenanceWindowResponseProperties) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *MaintenanceWindowResponseProperties) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *MaintenanceWindowResponseProperties) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetTitle + +`func (o *MaintenanceWindowResponseProperties) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *MaintenanceWindowResponseProperties) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *MaintenanceWindowResponseProperties) SetTitle(v string)` + +SetTitle sets Title field to given value. + + +### GetUpdatedAt + +`func (o *MaintenanceWindowResponseProperties) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *MaintenanceWindowResponseProperties) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *MaintenanceWindowResponseProperties) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + + +### GetUpdatedBy + +`func (o *MaintenanceWindowResponseProperties) GetUpdatedBy() string` + +GetUpdatedBy returns the UpdatedBy field if non-nil, zero value otherwise. + +### GetUpdatedByOk + +`func (o *MaintenanceWindowResponseProperties) GetUpdatedByOk() (*string, bool)` + +GetUpdatedByOk returns a tuple with the UpdatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedBy + +`func (o *MaintenanceWindowResponseProperties) SetUpdatedBy(v string)` + +SetUpdatedBy sets UpdatedBy field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/MaintenanceWindowResponsePropertiesSchedule.md b/generated/alerting/docs/MaintenanceWindowResponsePropertiesSchedule.md new file mode 100644 index 000000000..ee4908e48 --- /dev/null +++ b/generated/alerting/docs/MaintenanceWindowResponsePropertiesSchedule.md @@ -0,0 +1,51 @@ +# MaintenanceWindowResponsePropertiesSchedule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Custom** | [**MaintenanceWindowResponsePropertiesScheduleCustom**](MaintenanceWindowResponsePropertiesScheduleCustom.md) | | + +## Methods + +### NewMaintenanceWindowResponsePropertiesSchedule + +`func NewMaintenanceWindowResponsePropertiesSchedule(custom MaintenanceWindowResponsePropertiesScheduleCustom, ) *MaintenanceWindowResponsePropertiesSchedule` + +NewMaintenanceWindowResponsePropertiesSchedule instantiates a new MaintenanceWindowResponsePropertiesSchedule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMaintenanceWindowResponsePropertiesScheduleWithDefaults + +`func NewMaintenanceWindowResponsePropertiesScheduleWithDefaults() *MaintenanceWindowResponsePropertiesSchedule` + +NewMaintenanceWindowResponsePropertiesScheduleWithDefaults instantiates a new MaintenanceWindowResponsePropertiesSchedule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCustom + +`func (o *MaintenanceWindowResponsePropertiesSchedule) GetCustom() MaintenanceWindowResponsePropertiesScheduleCustom` + +GetCustom returns the Custom field if non-nil, zero value otherwise. + +### GetCustomOk + +`func (o *MaintenanceWindowResponsePropertiesSchedule) GetCustomOk() (*MaintenanceWindowResponsePropertiesScheduleCustom, bool)` + +GetCustomOk returns a tuple with the Custom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustom + +`func (o *MaintenanceWindowResponsePropertiesSchedule) SetCustom(v MaintenanceWindowResponsePropertiesScheduleCustom)` + +SetCustom sets Custom field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/MaintenanceWindowResponsePropertiesScheduleCustom.md b/generated/alerting/docs/MaintenanceWindowResponsePropertiesScheduleCustom.md new file mode 100644 index 000000000..1a03305f8 --- /dev/null +++ b/generated/alerting/docs/MaintenanceWindowResponsePropertiesScheduleCustom.md @@ -0,0 +1,124 @@ +# MaintenanceWindowResponsePropertiesScheduleCustom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Duration** | **string** | The duration of the schedule. It allows values in `<integer><unit>` format. `<unit>` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`. | +**Recurring** | Pointer to [**MaintenanceWindowResponsePropertiesScheduleCustomRecurring**](MaintenanceWindowResponsePropertiesScheduleCustomRecurring.md) | | [optional] +**Start** | **string** | The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`. | +**Timezone** | Pointer to **string** | The timezone of the schedule. The default timezone is UTC. | [optional] + +## Methods + +### NewMaintenanceWindowResponsePropertiesScheduleCustom + +`func NewMaintenanceWindowResponsePropertiesScheduleCustom(duration string, start string, ) *MaintenanceWindowResponsePropertiesScheduleCustom` + +NewMaintenanceWindowResponsePropertiesScheduleCustom instantiates a new MaintenanceWindowResponsePropertiesScheduleCustom object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMaintenanceWindowResponsePropertiesScheduleCustomWithDefaults + +`func NewMaintenanceWindowResponsePropertiesScheduleCustomWithDefaults() *MaintenanceWindowResponsePropertiesScheduleCustom` + +NewMaintenanceWindowResponsePropertiesScheduleCustomWithDefaults instantiates a new MaintenanceWindowResponsePropertiesScheduleCustom object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDuration + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustom) GetDuration() string` + +GetDuration returns the Duration field if non-nil, zero value otherwise. + +### GetDurationOk + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustom) GetDurationOk() (*string, bool)` + +GetDurationOk returns a tuple with the Duration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDuration + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustom) SetDuration(v string)` + +SetDuration sets Duration field to given value. + + +### GetRecurring + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustom) GetRecurring() MaintenanceWindowResponsePropertiesScheduleCustomRecurring` + +GetRecurring returns the Recurring field if non-nil, zero value otherwise. + +### GetRecurringOk + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustom) GetRecurringOk() (*MaintenanceWindowResponsePropertiesScheduleCustomRecurring, bool)` + +GetRecurringOk returns a tuple with the Recurring field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurring + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustom) SetRecurring(v MaintenanceWindowResponsePropertiesScheduleCustomRecurring)` + +SetRecurring sets Recurring field to given value. + +### HasRecurring + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustom) HasRecurring() bool` + +HasRecurring returns a boolean if a field has been set. + +### GetStart + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustom) GetStart() string` + +GetStart returns the Start field if non-nil, zero value otherwise. + +### GetStartOk + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustom) GetStartOk() (*string, bool)` + +GetStartOk returns a tuple with the Start field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStart + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustom) SetStart(v string)` + +SetStart sets Start field to given value. + + +### GetTimezone + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustom) GetTimezone() string` + +GetTimezone returns the Timezone field if non-nil, zero value otherwise. + +### GetTimezoneOk + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustom) GetTimezoneOk() (*string, bool)` + +GetTimezoneOk returns a tuple with the Timezone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimezone + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustom) SetTimezone(v string)` + +SetTimezone sets Timezone field to given value. + +### HasTimezone + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustom) HasTimezone() bool` + +HasTimezone returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/MaintenanceWindowResponsePropertiesScheduleCustomRecurring.md b/generated/alerting/docs/MaintenanceWindowResponsePropertiesScheduleCustomRecurring.md new file mode 100644 index 000000000..a21e01a7e --- /dev/null +++ b/generated/alerting/docs/MaintenanceWindowResponsePropertiesScheduleCustomRecurring.md @@ -0,0 +1,186 @@ +# MaintenanceWindowResponsePropertiesScheduleCustomRecurring + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | Pointer to **string** | The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`. | [optional] +**Every** | Pointer to **string** | The interval and frequency of a recurring schedule. It allows values in `<integer><unit>` format. `<unit>` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`. | [optional] +**Occurrences** | Pointer to **float32** | The total number of recurrences of the schedule. | [optional] +**OnMonth** | Pointer to **[]float32** | | [optional] +**OnMonthDay** | Pointer to **[]float32** | | [optional] +**OnWeekDay** | Pointer to **[]string** | | [optional] + +## Methods + +### NewMaintenanceWindowResponsePropertiesScheduleCustomRecurring + +`func NewMaintenanceWindowResponsePropertiesScheduleCustomRecurring() *MaintenanceWindowResponsePropertiesScheduleCustomRecurring` + +NewMaintenanceWindowResponsePropertiesScheduleCustomRecurring instantiates a new MaintenanceWindowResponsePropertiesScheduleCustomRecurring object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMaintenanceWindowResponsePropertiesScheduleCustomRecurringWithDefaults + +`func NewMaintenanceWindowResponsePropertiesScheduleCustomRecurringWithDefaults() *MaintenanceWindowResponsePropertiesScheduleCustomRecurring` + +NewMaintenanceWindowResponsePropertiesScheduleCustomRecurringWithDefaults instantiates a new MaintenanceWindowResponsePropertiesScheduleCustomRecurring object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnd + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetEnd() string` + +GetEnd returns the End field if non-nil, zero value otherwise. + +### GetEndOk + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetEndOk() (*string, bool)` + +GetEndOk returns a tuple with the End field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnd + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) SetEnd(v string)` + +SetEnd sets End field to given value. + +### HasEnd + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) HasEnd() bool` + +HasEnd returns a boolean if a field has been set. + +### GetEvery + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetEvery() string` + +GetEvery returns the Every field if non-nil, zero value otherwise. + +### GetEveryOk + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetEveryOk() (*string, bool)` + +GetEveryOk returns a tuple with the Every field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEvery + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) SetEvery(v string)` + +SetEvery sets Every field to given value. + +### HasEvery + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) HasEvery() bool` + +HasEvery returns a boolean if a field has been set. + +### GetOccurrences + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetOccurrences() float32` + +GetOccurrences returns the Occurrences field if non-nil, zero value otherwise. + +### GetOccurrencesOk + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetOccurrencesOk() (*float32, bool)` + +GetOccurrencesOk returns a tuple with the Occurrences field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOccurrences + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) SetOccurrences(v float32)` + +SetOccurrences sets Occurrences field to given value. + +### HasOccurrences + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) HasOccurrences() bool` + +HasOccurrences returns a boolean if a field has been set. + +### GetOnMonth + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetOnMonth() []float32` + +GetOnMonth returns the OnMonth field if non-nil, zero value otherwise. + +### GetOnMonthOk + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetOnMonthOk() (*[]float32, bool)` + +GetOnMonthOk returns a tuple with the OnMonth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnMonth + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) SetOnMonth(v []float32)` + +SetOnMonth sets OnMonth field to given value. + +### HasOnMonth + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) HasOnMonth() bool` + +HasOnMonth returns a boolean if a field has been set. + +### GetOnMonthDay + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetOnMonthDay() []float32` + +GetOnMonthDay returns the OnMonthDay field if non-nil, zero value otherwise. + +### GetOnMonthDayOk + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetOnMonthDayOk() (*[]float32, bool)` + +GetOnMonthDayOk returns a tuple with the OnMonthDay field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnMonthDay + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) SetOnMonthDay(v []float32)` + +SetOnMonthDay sets OnMonthDay field to given value. + +### HasOnMonthDay + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) HasOnMonthDay() bool` + +HasOnMonthDay returns a boolean if a field has been set. + +### GetOnWeekDay + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetOnWeekDay() []string` + +GetOnWeekDay returns the OnWeekDay field if non-nil, zero value otherwise. + +### GetOnWeekDayOk + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetOnWeekDayOk() (*[]string, bool)` + +GetOnWeekDayOk returns a tuple with the OnWeekDay field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnWeekDay + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) SetOnWeekDay(v []string)` + +SetOnWeekDay sets OnWeekDay field to given value. + +### HasOnWeekDay + +`func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) HasOnWeekDay() bool` + +HasOnWeekDay returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/MaintenanceWindowResponsePropertiesScope.md b/generated/alerting/docs/MaintenanceWindowResponsePropertiesScope.md new file mode 100644 index 000000000..4d1d9dcc5 --- /dev/null +++ b/generated/alerting/docs/MaintenanceWindowResponsePropertiesScope.md @@ -0,0 +1,51 @@ +# MaintenanceWindowResponsePropertiesScope + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Alerting** | [**MaintenanceWindowResponsePropertiesScopeAlerting**](MaintenanceWindowResponsePropertiesScopeAlerting.md) | | + +## Methods + +### NewMaintenanceWindowResponsePropertiesScope + +`func NewMaintenanceWindowResponsePropertiesScope(alerting MaintenanceWindowResponsePropertiesScopeAlerting, ) *MaintenanceWindowResponsePropertiesScope` + +NewMaintenanceWindowResponsePropertiesScope instantiates a new MaintenanceWindowResponsePropertiesScope object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMaintenanceWindowResponsePropertiesScopeWithDefaults + +`func NewMaintenanceWindowResponsePropertiesScopeWithDefaults() *MaintenanceWindowResponsePropertiesScope` + +NewMaintenanceWindowResponsePropertiesScopeWithDefaults instantiates a new MaintenanceWindowResponsePropertiesScope object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAlerting + +`func (o *MaintenanceWindowResponsePropertiesScope) GetAlerting() MaintenanceWindowResponsePropertiesScopeAlerting` + +GetAlerting returns the Alerting field if non-nil, zero value otherwise. + +### GetAlertingOk + +`func (o *MaintenanceWindowResponsePropertiesScope) GetAlertingOk() (*MaintenanceWindowResponsePropertiesScopeAlerting, bool)` + +GetAlertingOk returns a tuple with the Alerting field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlerting + +`func (o *MaintenanceWindowResponsePropertiesScope) SetAlerting(v MaintenanceWindowResponsePropertiesScopeAlerting)` + +SetAlerting sets Alerting field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/MaintenanceWindowResponsePropertiesScopeAlerting.md b/generated/alerting/docs/MaintenanceWindowResponsePropertiesScopeAlerting.md new file mode 100644 index 000000000..b8b668c58 --- /dev/null +++ b/generated/alerting/docs/MaintenanceWindowResponsePropertiesScopeAlerting.md @@ -0,0 +1,51 @@ +# MaintenanceWindowResponsePropertiesScopeAlerting + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Query** | [**MaintenanceWindowResponsePropertiesScopeAlertingQuery**](MaintenanceWindowResponsePropertiesScopeAlertingQuery.md) | | + +## Methods + +### NewMaintenanceWindowResponsePropertiesScopeAlerting + +`func NewMaintenanceWindowResponsePropertiesScopeAlerting(query MaintenanceWindowResponsePropertiesScopeAlertingQuery, ) *MaintenanceWindowResponsePropertiesScopeAlerting` + +NewMaintenanceWindowResponsePropertiesScopeAlerting instantiates a new MaintenanceWindowResponsePropertiesScopeAlerting object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMaintenanceWindowResponsePropertiesScopeAlertingWithDefaults + +`func NewMaintenanceWindowResponsePropertiesScopeAlertingWithDefaults() *MaintenanceWindowResponsePropertiesScopeAlerting` + +NewMaintenanceWindowResponsePropertiesScopeAlertingWithDefaults instantiates a new MaintenanceWindowResponsePropertiesScopeAlerting object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetQuery + +`func (o *MaintenanceWindowResponsePropertiesScopeAlerting) GetQuery() MaintenanceWindowResponsePropertiesScopeAlertingQuery` + +GetQuery returns the Query field if non-nil, zero value otherwise. + +### GetQueryOk + +`func (o *MaintenanceWindowResponsePropertiesScopeAlerting) GetQueryOk() (*MaintenanceWindowResponsePropertiesScopeAlertingQuery, bool)` + +GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuery + +`func (o *MaintenanceWindowResponsePropertiesScopeAlerting) SetQuery(v MaintenanceWindowResponsePropertiesScopeAlertingQuery)` + +SetQuery sets Query field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/MaintenanceWindowResponsePropertiesScopeAlertingQuery.md b/generated/alerting/docs/MaintenanceWindowResponsePropertiesScopeAlertingQuery.md new file mode 100644 index 000000000..361ea68cd --- /dev/null +++ b/generated/alerting/docs/MaintenanceWindowResponsePropertiesScopeAlertingQuery.md @@ -0,0 +1,51 @@ +# MaintenanceWindowResponsePropertiesScopeAlertingQuery + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kql** | **string** | A filter written in Kibana Query Language (KQL). | + +## Methods + +### NewMaintenanceWindowResponsePropertiesScopeAlertingQuery + +`func NewMaintenanceWindowResponsePropertiesScopeAlertingQuery(kql string, ) *MaintenanceWindowResponsePropertiesScopeAlertingQuery` + +NewMaintenanceWindowResponsePropertiesScopeAlertingQuery instantiates a new MaintenanceWindowResponsePropertiesScopeAlertingQuery object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMaintenanceWindowResponsePropertiesScopeAlertingQueryWithDefaults + +`func NewMaintenanceWindowResponsePropertiesScopeAlertingQueryWithDefaults() *MaintenanceWindowResponsePropertiesScopeAlertingQuery` + +NewMaintenanceWindowResponsePropertiesScopeAlertingQueryWithDefaults instantiates a new MaintenanceWindowResponsePropertiesScopeAlertingQuery object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetKql + +`func (o *MaintenanceWindowResponsePropertiesScopeAlertingQuery) GetKql() string` + +GetKql returns the Kql field if non-nil, zero value otherwise. + +### GetKqlOk + +`func (o *MaintenanceWindowResponsePropertiesScopeAlertingQuery) GetKqlOk() (*string, bool)` + +GetKqlOk returns a tuple with the Kql field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKql + +`func (o *MaintenanceWindowResponsePropertiesScopeAlertingQuery) SetKql(v string)` + +SetKql sets Kql field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/Model403Response.md b/generated/alerting/docs/Model403Response.md new file mode 100644 index 000000000..0a14ad004 --- /dev/null +++ b/generated/alerting/docs/Model403Response.md @@ -0,0 +1,108 @@ +# Model403Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusCode** | Pointer to **float32** | Error status code | [optional] +**Error** | Pointer to **string** | Error type | [optional] +**Message** | Pointer to **string** | Error message | [optional] + +## Methods + +### NewModel403Response + +`func NewModel403Response() *Model403Response` + +NewModel403Response instantiates a new Model403Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewModel403ResponseWithDefaults + +`func NewModel403ResponseWithDefaults() *Model403Response` + +NewModel403ResponseWithDefaults instantiates a new Model403Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatusCode + +`func (o *Model403Response) GetStatusCode() float32` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *Model403Response) GetStatusCodeOk() (*float32, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *Model403Response) SetStatusCode(v float32)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *Model403Response) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + +### GetError + +`func (o *Model403Response) GetError() string` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *Model403Response) GetErrorOk() (*string, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *Model403Response) SetError(v string)` + +SetError sets Error field to given value. + +### HasError + +`func (o *Model403Response) HasError() bool` + +HasError returns a boolean if a field has been set. + +### GetMessage + +`func (o *Model403Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *Model403Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *Model403Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *Model403Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/PatchAlertingMaintenanceWindowIdRequest.md b/generated/alerting/docs/PatchAlertingMaintenanceWindowIdRequest.md new file mode 100644 index 000000000..3e5457393 --- /dev/null +++ b/generated/alerting/docs/PatchAlertingMaintenanceWindowIdRequest.md @@ -0,0 +1,154 @@ +# PatchAlertingMaintenanceWindowIdRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **interface{}** | Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. | [optional] +**Schedule** | Pointer to [**PostAlertingMaintenanceWindow200ResponseSchedule**](PostAlertingMaintenanceWindow200ResponseSchedule.md) | | [optional] +**Scope** | Pointer to [**PostAlertingMaintenanceWindowRequestScope**](PostAlertingMaintenanceWindowRequestScope.md) | | [optional] +**Title** | Pointer to **interface{}** | The name of the maintenance window. While this name does not have to be unique, a distinctive name can help you identify a specific maintenance window. | [optional] + +## Methods + +### NewPatchAlertingMaintenanceWindowIdRequest + +`func NewPatchAlertingMaintenanceWindowIdRequest() *PatchAlertingMaintenanceWindowIdRequest` + +NewPatchAlertingMaintenanceWindowIdRequest instantiates a new PatchAlertingMaintenanceWindowIdRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchAlertingMaintenanceWindowIdRequestWithDefaults + +`func NewPatchAlertingMaintenanceWindowIdRequestWithDefaults() *PatchAlertingMaintenanceWindowIdRequest` + +NewPatchAlertingMaintenanceWindowIdRequestWithDefaults instantiates a new PatchAlertingMaintenanceWindowIdRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *PatchAlertingMaintenanceWindowIdRequest) GetEnabled() interface{}` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *PatchAlertingMaintenanceWindowIdRequest) GetEnabledOk() (*interface{}, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *PatchAlertingMaintenanceWindowIdRequest) SetEnabled(v interface{})` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *PatchAlertingMaintenanceWindowIdRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### SetEnabledNil + +`func (o *PatchAlertingMaintenanceWindowIdRequest) SetEnabledNil(b bool)` + + SetEnabledNil sets the value for Enabled to be an explicit nil + +### UnsetEnabled +`func (o *PatchAlertingMaintenanceWindowIdRequest) UnsetEnabled()` + +UnsetEnabled ensures that no value is present for Enabled, not even an explicit nil +### GetSchedule + +`func (o *PatchAlertingMaintenanceWindowIdRequest) GetSchedule() PostAlertingMaintenanceWindow200ResponseSchedule` + +GetSchedule returns the Schedule field if non-nil, zero value otherwise. + +### GetScheduleOk + +`func (o *PatchAlertingMaintenanceWindowIdRequest) GetScheduleOk() (*PostAlertingMaintenanceWindow200ResponseSchedule, bool)` + +GetScheduleOk returns a tuple with the Schedule field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSchedule + +`func (o *PatchAlertingMaintenanceWindowIdRequest) SetSchedule(v PostAlertingMaintenanceWindow200ResponseSchedule)` + +SetSchedule sets Schedule field to given value. + +### HasSchedule + +`func (o *PatchAlertingMaintenanceWindowIdRequest) HasSchedule() bool` + +HasSchedule returns a boolean if a field has been set. + +### GetScope + +`func (o *PatchAlertingMaintenanceWindowIdRequest) GetScope() PostAlertingMaintenanceWindowRequestScope` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *PatchAlertingMaintenanceWindowIdRequest) GetScopeOk() (*PostAlertingMaintenanceWindowRequestScope, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *PatchAlertingMaintenanceWindowIdRequest) SetScope(v PostAlertingMaintenanceWindowRequestScope)` + +SetScope sets Scope field to given value. + +### HasScope + +`func (o *PatchAlertingMaintenanceWindowIdRequest) HasScope() bool` + +HasScope returns a boolean if a field has been set. + +### GetTitle + +`func (o *PatchAlertingMaintenanceWindowIdRequest) GetTitle() interface{}` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *PatchAlertingMaintenanceWindowIdRequest) GetTitleOk() (*interface{}, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *PatchAlertingMaintenanceWindowIdRequest) SetTitle(v interface{})` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *PatchAlertingMaintenanceWindowIdRequest) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### SetTitleNil + +`func (o *PatchAlertingMaintenanceWindowIdRequest) SetTitleNil(b bool)` + + SetTitleNil sets the value for Title to be an explicit nil + +### UnsetTitle +`func (o *PatchAlertingMaintenanceWindowIdRequest) UnsetTitle()` + +UnsetTitle ensures that no value is present for Title, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/PostAlertingMaintenanceWindow200Response.md b/generated/alerting/docs/PostAlertingMaintenanceWindow200Response.md new file mode 100644 index 000000000..0ae0c0725 --- /dev/null +++ b/generated/alerting/docs/PostAlertingMaintenanceWindow200Response.md @@ -0,0 +1,325 @@ +# PostAlertingMaintenanceWindow200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **interface{}** | The date and time when the maintenance window was created. | +**CreatedBy** | **interface{}** | The identifier for the user that created the maintenance window. | +**Enabled** | **interface{}** | Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. | +**Id** | **interface{}** | The identifier for the maintenance window. | +**Schedule** | [**PostAlertingMaintenanceWindow200ResponseSchedule**](PostAlertingMaintenanceWindow200ResponseSchedule.md) | | +**Scope** | Pointer to [**PostAlertingMaintenanceWindowRequestScope**](PostAlertingMaintenanceWindowRequestScope.md) | | [optional] +**Status** | **interface{}** | The current status of the maintenance window. | +**Title** | **interface{}** | The name of the maintenance window. | +**UpdatedAt** | **interface{}** | The date and time when the maintenance window was last updated. | +**UpdatedBy** | **interface{}** | The identifier for the user that last updated this maintenance window. | + +## Methods + +### NewPostAlertingMaintenanceWindow200Response + +`func NewPostAlertingMaintenanceWindow200Response(createdAt interface{}, createdBy interface{}, enabled interface{}, id interface{}, schedule PostAlertingMaintenanceWindow200ResponseSchedule, status interface{}, title interface{}, updatedAt interface{}, updatedBy interface{}, ) *PostAlertingMaintenanceWindow200Response` + +NewPostAlertingMaintenanceWindow200Response instantiates a new PostAlertingMaintenanceWindow200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPostAlertingMaintenanceWindow200ResponseWithDefaults + +`func NewPostAlertingMaintenanceWindow200ResponseWithDefaults() *PostAlertingMaintenanceWindow200Response` + +NewPostAlertingMaintenanceWindow200ResponseWithDefaults instantiates a new PostAlertingMaintenanceWindow200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCreatedAt + +`func (o *PostAlertingMaintenanceWindow200Response) GetCreatedAt() interface{}` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *PostAlertingMaintenanceWindow200Response) GetCreatedAtOk() (*interface{}, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *PostAlertingMaintenanceWindow200Response) SetCreatedAt(v interface{})` + +SetCreatedAt sets CreatedAt field to given value. + + +### SetCreatedAtNil + +`func (o *PostAlertingMaintenanceWindow200Response) SetCreatedAtNil(b bool)` + + SetCreatedAtNil sets the value for CreatedAt to be an explicit nil + +### UnsetCreatedAt +`func (o *PostAlertingMaintenanceWindow200Response) UnsetCreatedAt()` + +UnsetCreatedAt ensures that no value is present for CreatedAt, not even an explicit nil +### GetCreatedBy + +`func (o *PostAlertingMaintenanceWindow200Response) GetCreatedBy() interface{}` + +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. + +### GetCreatedByOk + +`func (o *PostAlertingMaintenanceWindow200Response) GetCreatedByOk() (*interface{}, bool)` + +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedBy + +`func (o *PostAlertingMaintenanceWindow200Response) SetCreatedBy(v interface{})` + +SetCreatedBy sets CreatedBy field to given value. + + +### SetCreatedByNil + +`func (o *PostAlertingMaintenanceWindow200Response) SetCreatedByNil(b bool)` + + SetCreatedByNil sets the value for CreatedBy to be an explicit nil + +### UnsetCreatedBy +`func (o *PostAlertingMaintenanceWindow200Response) UnsetCreatedBy()` + +UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +### GetEnabled + +`func (o *PostAlertingMaintenanceWindow200Response) GetEnabled() interface{}` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *PostAlertingMaintenanceWindow200Response) GetEnabledOk() (*interface{}, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *PostAlertingMaintenanceWindow200Response) SetEnabled(v interface{})` + +SetEnabled sets Enabled field to given value. + + +### SetEnabledNil + +`func (o *PostAlertingMaintenanceWindow200Response) SetEnabledNil(b bool)` + + SetEnabledNil sets the value for Enabled to be an explicit nil + +### UnsetEnabled +`func (o *PostAlertingMaintenanceWindow200Response) UnsetEnabled()` + +UnsetEnabled ensures that no value is present for Enabled, not even an explicit nil +### GetId + +`func (o *PostAlertingMaintenanceWindow200Response) GetId() interface{}` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *PostAlertingMaintenanceWindow200Response) GetIdOk() (*interface{}, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *PostAlertingMaintenanceWindow200Response) SetId(v interface{})` + +SetId sets Id field to given value. + + +### SetIdNil + +`func (o *PostAlertingMaintenanceWindow200Response) SetIdNil(b bool)` + + SetIdNil sets the value for Id to be an explicit nil + +### UnsetId +`func (o *PostAlertingMaintenanceWindow200Response) UnsetId()` + +UnsetId ensures that no value is present for Id, not even an explicit nil +### GetSchedule + +`func (o *PostAlertingMaintenanceWindow200Response) GetSchedule() PostAlertingMaintenanceWindow200ResponseSchedule` + +GetSchedule returns the Schedule field if non-nil, zero value otherwise. + +### GetScheduleOk + +`func (o *PostAlertingMaintenanceWindow200Response) GetScheduleOk() (*PostAlertingMaintenanceWindow200ResponseSchedule, bool)` + +GetScheduleOk returns a tuple with the Schedule field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSchedule + +`func (o *PostAlertingMaintenanceWindow200Response) SetSchedule(v PostAlertingMaintenanceWindow200ResponseSchedule)` + +SetSchedule sets Schedule field to given value. + + +### GetScope + +`func (o *PostAlertingMaintenanceWindow200Response) GetScope() PostAlertingMaintenanceWindowRequestScope` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *PostAlertingMaintenanceWindow200Response) GetScopeOk() (*PostAlertingMaintenanceWindowRequestScope, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *PostAlertingMaintenanceWindow200Response) SetScope(v PostAlertingMaintenanceWindowRequestScope)` + +SetScope sets Scope field to given value. + +### HasScope + +`func (o *PostAlertingMaintenanceWindow200Response) HasScope() bool` + +HasScope returns a boolean if a field has been set. + +### GetStatus + +`func (o *PostAlertingMaintenanceWindow200Response) GetStatus() interface{}` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *PostAlertingMaintenanceWindow200Response) GetStatusOk() (*interface{}, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *PostAlertingMaintenanceWindow200Response) SetStatus(v interface{})` + +SetStatus sets Status field to given value. + + +### SetStatusNil + +`func (o *PostAlertingMaintenanceWindow200Response) SetStatusNil(b bool)` + + SetStatusNil sets the value for Status to be an explicit nil + +### UnsetStatus +`func (o *PostAlertingMaintenanceWindow200Response) UnsetStatus()` + +UnsetStatus ensures that no value is present for Status, not even an explicit nil +### GetTitle + +`func (o *PostAlertingMaintenanceWindow200Response) GetTitle() interface{}` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *PostAlertingMaintenanceWindow200Response) GetTitleOk() (*interface{}, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *PostAlertingMaintenanceWindow200Response) SetTitle(v interface{})` + +SetTitle sets Title field to given value. + + +### SetTitleNil + +`func (o *PostAlertingMaintenanceWindow200Response) SetTitleNil(b bool)` + + SetTitleNil sets the value for Title to be an explicit nil + +### UnsetTitle +`func (o *PostAlertingMaintenanceWindow200Response) UnsetTitle()` + +UnsetTitle ensures that no value is present for Title, not even an explicit nil +### GetUpdatedAt + +`func (o *PostAlertingMaintenanceWindow200Response) GetUpdatedAt() interface{}` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *PostAlertingMaintenanceWindow200Response) GetUpdatedAtOk() (*interface{}, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *PostAlertingMaintenanceWindow200Response) SetUpdatedAt(v interface{})` + +SetUpdatedAt sets UpdatedAt field to given value. + + +### SetUpdatedAtNil + +`func (o *PostAlertingMaintenanceWindow200Response) SetUpdatedAtNil(b bool)` + + SetUpdatedAtNil sets the value for UpdatedAt to be an explicit nil + +### UnsetUpdatedAt +`func (o *PostAlertingMaintenanceWindow200Response) UnsetUpdatedAt()` + +UnsetUpdatedAt ensures that no value is present for UpdatedAt, not even an explicit nil +### GetUpdatedBy + +`func (o *PostAlertingMaintenanceWindow200Response) GetUpdatedBy() interface{}` + +GetUpdatedBy returns the UpdatedBy field if non-nil, zero value otherwise. + +### GetUpdatedByOk + +`func (o *PostAlertingMaintenanceWindow200Response) GetUpdatedByOk() (*interface{}, bool)` + +GetUpdatedByOk returns a tuple with the UpdatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedBy + +`func (o *PostAlertingMaintenanceWindow200Response) SetUpdatedBy(v interface{})` + +SetUpdatedBy sets UpdatedBy field to given value. + + +### SetUpdatedByNil + +`func (o *PostAlertingMaintenanceWindow200Response) SetUpdatedByNil(b bool)` + + SetUpdatedByNil sets the value for UpdatedBy to be an explicit nil + +### UnsetUpdatedBy +`func (o *PostAlertingMaintenanceWindow200Response) UnsetUpdatedBy()` + +UnsetUpdatedBy ensures that no value is present for UpdatedBy, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/PostAlertingMaintenanceWindow200ResponseSchedule.md b/generated/alerting/docs/PostAlertingMaintenanceWindow200ResponseSchedule.md new file mode 100644 index 000000000..65ddf3a8b --- /dev/null +++ b/generated/alerting/docs/PostAlertingMaintenanceWindow200ResponseSchedule.md @@ -0,0 +1,51 @@ +# PostAlertingMaintenanceWindow200ResponseSchedule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Custom** | [**PostAlertingMaintenanceWindow200ResponseScheduleCustom**](PostAlertingMaintenanceWindow200ResponseScheduleCustom.md) | | + +## Methods + +### NewPostAlertingMaintenanceWindow200ResponseSchedule + +`func NewPostAlertingMaintenanceWindow200ResponseSchedule(custom PostAlertingMaintenanceWindow200ResponseScheduleCustom, ) *PostAlertingMaintenanceWindow200ResponseSchedule` + +NewPostAlertingMaintenanceWindow200ResponseSchedule instantiates a new PostAlertingMaintenanceWindow200ResponseSchedule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPostAlertingMaintenanceWindow200ResponseScheduleWithDefaults + +`func NewPostAlertingMaintenanceWindow200ResponseScheduleWithDefaults() *PostAlertingMaintenanceWindow200ResponseSchedule` + +NewPostAlertingMaintenanceWindow200ResponseScheduleWithDefaults instantiates a new PostAlertingMaintenanceWindow200ResponseSchedule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCustom + +`func (o *PostAlertingMaintenanceWindow200ResponseSchedule) GetCustom() PostAlertingMaintenanceWindow200ResponseScheduleCustom` + +GetCustom returns the Custom field if non-nil, zero value otherwise. + +### GetCustomOk + +`func (o *PostAlertingMaintenanceWindow200ResponseSchedule) GetCustomOk() (*PostAlertingMaintenanceWindow200ResponseScheduleCustom, bool)` + +GetCustomOk returns a tuple with the Custom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustom + +`func (o *PostAlertingMaintenanceWindow200ResponseSchedule) SetCustom(v PostAlertingMaintenanceWindow200ResponseScheduleCustom)` + +SetCustom sets Custom field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/PostAlertingMaintenanceWindow200ResponseScheduleCustom.md b/generated/alerting/docs/PostAlertingMaintenanceWindow200ResponseScheduleCustom.md new file mode 100644 index 000000000..9a4a09de6 --- /dev/null +++ b/generated/alerting/docs/PostAlertingMaintenanceWindow200ResponseScheduleCustom.md @@ -0,0 +1,154 @@ +# PostAlertingMaintenanceWindow200ResponseScheduleCustom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Duration** | **interface{}** | The duration of the schedule. It allows values in `<integer><unit>` format. `<unit>` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`. | +**Recurring** | Pointer to [**PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring**](PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring.md) | | [optional] +**Start** | **interface{}** | The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`. | +**Timezone** | Pointer to **interface{}** | The timezone of the schedule. The default timezone is UTC. | [optional] + +## Methods + +### NewPostAlertingMaintenanceWindow200ResponseScheduleCustom + +`func NewPostAlertingMaintenanceWindow200ResponseScheduleCustom(duration interface{}, start interface{}, ) *PostAlertingMaintenanceWindow200ResponseScheduleCustom` + +NewPostAlertingMaintenanceWindow200ResponseScheduleCustom instantiates a new PostAlertingMaintenanceWindow200ResponseScheduleCustom object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPostAlertingMaintenanceWindow200ResponseScheduleCustomWithDefaults + +`func NewPostAlertingMaintenanceWindow200ResponseScheduleCustomWithDefaults() *PostAlertingMaintenanceWindow200ResponseScheduleCustom` + +NewPostAlertingMaintenanceWindow200ResponseScheduleCustomWithDefaults instantiates a new PostAlertingMaintenanceWindow200ResponseScheduleCustom object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDuration + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) GetDuration() interface{}` + +GetDuration returns the Duration field if non-nil, zero value otherwise. + +### GetDurationOk + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) GetDurationOk() (*interface{}, bool)` + +GetDurationOk returns a tuple with the Duration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDuration + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) SetDuration(v interface{})` + +SetDuration sets Duration field to given value. + + +### SetDurationNil + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) SetDurationNil(b bool)` + + SetDurationNil sets the value for Duration to be an explicit nil + +### UnsetDuration +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) UnsetDuration()` + +UnsetDuration ensures that no value is present for Duration, not even an explicit nil +### GetRecurring + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) GetRecurring() PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring` + +GetRecurring returns the Recurring field if non-nil, zero value otherwise. + +### GetRecurringOk + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) GetRecurringOk() (*PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring, bool)` + +GetRecurringOk returns a tuple with the Recurring field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurring + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) SetRecurring(v PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring)` + +SetRecurring sets Recurring field to given value. + +### HasRecurring + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) HasRecurring() bool` + +HasRecurring returns a boolean if a field has been set. + +### GetStart + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) GetStart() interface{}` + +GetStart returns the Start field if non-nil, zero value otherwise. + +### GetStartOk + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) GetStartOk() (*interface{}, bool)` + +GetStartOk returns a tuple with the Start field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStart + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) SetStart(v interface{})` + +SetStart sets Start field to given value. + + +### SetStartNil + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) SetStartNil(b bool)` + + SetStartNil sets the value for Start to be an explicit nil + +### UnsetStart +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) UnsetStart()` + +UnsetStart ensures that no value is present for Start, not even an explicit nil +### GetTimezone + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) GetTimezone() interface{}` + +GetTimezone returns the Timezone field if non-nil, zero value otherwise. + +### GetTimezoneOk + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) GetTimezoneOk() (*interface{}, bool)` + +GetTimezoneOk returns a tuple with the Timezone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimezone + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) SetTimezone(v interface{})` + +SetTimezone sets Timezone field to given value. + +### HasTimezone + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) HasTimezone() bool` + +HasTimezone returns a boolean if a field has been set. + +### SetTimezoneNil + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) SetTimezoneNil(b bool)` + + SetTimezoneNil sets the value for Timezone to be an explicit nil + +### UnsetTimezone +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) UnsetTimezone()` + +UnsetTimezone ensures that no value is present for Timezone, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring.md b/generated/alerting/docs/PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring.md new file mode 100644 index 000000000..d8b873e99 --- /dev/null +++ b/generated/alerting/docs/PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring.md @@ -0,0 +1,246 @@ +# PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | Pointer to **interface{}** | The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`. | [optional] +**Every** | Pointer to **interface{}** | The interval and frequency of a recurring schedule. It allows values in `<integer><unit>` format. `<unit>` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`. | [optional] +**Occurrences** | Pointer to **interface{}** | The total number of recurrences of the schedule. | [optional] +**OnMonth** | Pointer to **interface{}** | The specific months for a recurring schedule. Valid values are 1-12. | [optional] +**OnMonthDay** | Pointer to **interface{}** | The specific days of the month for a recurring schedule. Valid values are 1-31. | [optional] +**OnWeekDay** | Pointer to **interface{}** | The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule. | [optional] + +## Methods + +### NewPostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring + +`func NewPostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring() *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring` + +NewPostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring instantiates a new PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPostAlertingMaintenanceWindow200ResponseScheduleCustomRecurringWithDefaults + +`func NewPostAlertingMaintenanceWindow200ResponseScheduleCustomRecurringWithDefaults() *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring` + +NewPostAlertingMaintenanceWindow200ResponseScheduleCustomRecurringWithDefaults instantiates a new PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnd + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetEnd() interface{}` + +GetEnd returns the End field if non-nil, zero value otherwise. + +### GetEndOk + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetEndOk() (*interface{}, bool)` + +GetEndOk returns a tuple with the End field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnd + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetEnd(v interface{})` + +SetEnd sets End field to given value. + +### HasEnd + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) HasEnd() bool` + +HasEnd returns a boolean if a field has been set. + +### SetEndNil + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetEndNil(b bool)` + + SetEndNil sets the value for End to be an explicit nil + +### UnsetEnd +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) UnsetEnd()` + +UnsetEnd ensures that no value is present for End, not even an explicit nil +### GetEvery + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetEvery() interface{}` + +GetEvery returns the Every field if non-nil, zero value otherwise. + +### GetEveryOk + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetEveryOk() (*interface{}, bool)` + +GetEveryOk returns a tuple with the Every field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEvery + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetEvery(v interface{})` + +SetEvery sets Every field to given value. + +### HasEvery + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) HasEvery() bool` + +HasEvery returns a boolean if a field has been set. + +### SetEveryNil + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetEveryNil(b bool)` + + SetEveryNil sets the value for Every to be an explicit nil + +### UnsetEvery +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) UnsetEvery()` + +UnsetEvery ensures that no value is present for Every, not even an explicit nil +### GetOccurrences + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetOccurrences() interface{}` + +GetOccurrences returns the Occurrences field if non-nil, zero value otherwise. + +### GetOccurrencesOk + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetOccurrencesOk() (*interface{}, bool)` + +GetOccurrencesOk returns a tuple with the Occurrences field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOccurrences + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetOccurrences(v interface{})` + +SetOccurrences sets Occurrences field to given value. + +### HasOccurrences + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) HasOccurrences() bool` + +HasOccurrences returns a boolean if a field has been set. + +### SetOccurrencesNil + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetOccurrencesNil(b bool)` + + SetOccurrencesNil sets the value for Occurrences to be an explicit nil + +### UnsetOccurrences +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) UnsetOccurrences()` + +UnsetOccurrences ensures that no value is present for Occurrences, not even an explicit nil +### GetOnMonth + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnMonth() interface{}` + +GetOnMonth returns the OnMonth field if non-nil, zero value otherwise. + +### GetOnMonthOk + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnMonthOk() (*interface{}, bool)` + +GetOnMonthOk returns a tuple with the OnMonth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnMonth + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnMonth(v interface{})` + +SetOnMonth sets OnMonth field to given value. + +### HasOnMonth + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) HasOnMonth() bool` + +HasOnMonth returns a boolean if a field has been set. + +### SetOnMonthNil + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnMonthNil(b bool)` + + SetOnMonthNil sets the value for OnMonth to be an explicit nil + +### UnsetOnMonth +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) UnsetOnMonth()` + +UnsetOnMonth ensures that no value is present for OnMonth, not even an explicit nil +### GetOnMonthDay + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnMonthDay() interface{}` + +GetOnMonthDay returns the OnMonthDay field if non-nil, zero value otherwise. + +### GetOnMonthDayOk + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnMonthDayOk() (*interface{}, bool)` + +GetOnMonthDayOk returns a tuple with the OnMonthDay field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnMonthDay + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnMonthDay(v interface{})` + +SetOnMonthDay sets OnMonthDay field to given value. + +### HasOnMonthDay + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) HasOnMonthDay() bool` + +HasOnMonthDay returns a boolean if a field has been set. + +### SetOnMonthDayNil + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnMonthDayNil(b bool)` + + SetOnMonthDayNil sets the value for OnMonthDay to be an explicit nil + +### UnsetOnMonthDay +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) UnsetOnMonthDay()` + +UnsetOnMonthDay ensures that no value is present for OnMonthDay, not even an explicit nil +### GetOnWeekDay + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnWeekDay() interface{}` + +GetOnWeekDay returns the OnWeekDay field if non-nil, zero value otherwise. + +### GetOnWeekDayOk + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnWeekDayOk() (*interface{}, bool)` + +GetOnWeekDayOk returns a tuple with the OnWeekDay field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnWeekDay + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnWeekDay(v interface{})` + +SetOnWeekDay sets OnWeekDay field to given value. + +### HasOnWeekDay + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) HasOnWeekDay() bool` + +HasOnWeekDay returns a boolean if a field has been set. + +### SetOnWeekDayNil + +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnWeekDayNil(b bool)` + + SetOnWeekDayNil sets the value for OnWeekDay to be an explicit nil + +### UnsetOnWeekDay +`func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) UnsetOnWeekDay()` + +UnsetOnWeekDay ensures that no value is present for OnWeekDay, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/PostAlertingMaintenanceWindowRequest.md b/generated/alerting/docs/PostAlertingMaintenanceWindowRequest.md new file mode 100644 index 000000000..1a4d82de6 --- /dev/null +++ b/generated/alerting/docs/PostAlertingMaintenanceWindowRequest.md @@ -0,0 +1,144 @@ +# PostAlertingMaintenanceWindowRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **interface{}** | Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. | [optional] +**Schedule** | [**PostAlertingMaintenanceWindowRequestSchedule**](PostAlertingMaintenanceWindowRequestSchedule.md) | | +**Scope** | Pointer to [**PostAlertingMaintenanceWindowRequestScope**](PostAlertingMaintenanceWindowRequestScope.md) | | [optional] +**Title** | **interface{}** | The name of the maintenance window. While this name does not have to be unique, a distinctive name can help you identify a specific maintenance window. | + +## Methods + +### NewPostAlertingMaintenanceWindowRequest + +`func NewPostAlertingMaintenanceWindowRequest(schedule PostAlertingMaintenanceWindowRequestSchedule, title interface{}, ) *PostAlertingMaintenanceWindowRequest` + +NewPostAlertingMaintenanceWindowRequest instantiates a new PostAlertingMaintenanceWindowRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPostAlertingMaintenanceWindowRequestWithDefaults + +`func NewPostAlertingMaintenanceWindowRequestWithDefaults() *PostAlertingMaintenanceWindowRequest` + +NewPostAlertingMaintenanceWindowRequestWithDefaults instantiates a new PostAlertingMaintenanceWindowRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *PostAlertingMaintenanceWindowRequest) GetEnabled() interface{}` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *PostAlertingMaintenanceWindowRequest) GetEnabledOk() (*interface{}, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *PostAlertingMaintenanceWindowRequest) SetEnabled(v interface{})` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *PostAlertingMaintenanceWindowRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### SetEnabledNil + +`func (o *PostAlertingMaintenanceWindowRequest) SetEnabledNil(b bool)` + + SetEnabledNil sets the value for Enabled to be an explicit nil + +### UnsetEnabled +`func (o *PostAlertingMaintenanceWindowRequest) UnsetEnabled()` + +UnsetEnabled ensures that no value is present for Enabled, not even an explicit nil +### GetSchedule + +`func (o *PostAlertingMaintenanceWindowRequest) GetSchedule() PostAlertingMaintenanceWindowRequestSchedule` + +GetSchedule returns the Schedule field if non-nil, zero value otherwise. + +### GetScheduleOk + +`func (o *PostAlertingMaintenanceWindowRequest) GetScheduleOk() (*PostAlertingMaintenanceWindowRequestSchedule, bool)` + +GetScheduleOk returns a tuple with the Schedule field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSchedule + +`func (o *PostAlertingMaintenanceWindowRequest) SetSchedule(v PostAlertingMaintenanceWindowRequestSchedule)` + +SetSchedule sets Schedule field to given value. + + +### GetScope + +`func (o *PostAlertingMaintenanceWindowRequest) GetScope() PostAlertingMaintenanceWindowRequestScope` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *PostAlertingMaintenanceWindowRequest) GetScopeOk() (*PostAlertingMaintenanceWindowRequestScope, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *PostAlertingMaintenanceWindowRequest) SetScope(v PostAlertingMaintenanceWindowRequestScope)` + +SetScope sets Scope field to given value. + +### HasScope + +`func (o *PostAlertingMaintenanceWindowRequest) HasScope() bool` + +HasScope returns a boolean if a field has been set. + +### GetTitle + +`func (o *PostAlertingMaintenanceWindowRequest) GetTitle() interface{}` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *PostAlertingMaintenanceWindowRequest) GetTitleOk() (*interface{}, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *PostAlertingMaintenanceWindowRequest) SetTitle(v interface{})` + +SetTitle sets Title field to given value. + + +### SetTitleNil + +`func (o *PostAlertingMaintenanceWindowRequest) SetTitleNil(b bool)` + + SetTitleNil sets the value for Title to be an explicit nil + +### UnsetTitle +`func (o *PostAlertingMaintenanceWindowRequest) UnsetTitle()` + +UnsetTitle ensures that no value is present for Title, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/PostAlertingMaintenanceWindowRequestSchedule.md b/generated/alerting/docs/PostAlertingMaintenanceWindowRequestSchedule.md new file mode 100644 index 000000000..65cbca7be --- /dev/null +++ b/generated/alerting/docs/PostAlertingMaintenanceWindowRequestSchedule.md @@ -0,0 +1,51 @@ +# PostAlertingMaintenanceWindowRequestSchedule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Custom** | [**PostAlertingMaintenanceWindowRequestScheduleCustom**](PostAlertingMaintenanceWindowRequestScheduleCustom.md) | | + +## Methods + +### NewPostAlertingMaintenanceWindowRequestSchedule + +`func NewPostAlertingMaintenanceWindowRequestSchedule(custom PostAlertingMaintenanceWindowRequestScheduleCustom, ) *PostAlertingMaintenanceWindowRequestSchedule` + +NewPostAlertingMaintenanceWindowRequestSchedule instantiates a new PostAlertingMaintenanceWindowRequestSchedule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPostAlertingMaintenanceWindowRequestScheduleWithDefaults + +`func NewPostAlertingMaintenanceWindowRequestScheduleWithDefaults() *PostAlertingMaintenanceWindowRequestSchedule` + +NewPostAlertingMaintenanceWindowRequestScheduleWithDefaults instantiates a new PostAlertingMaintenanceWindowRequestSchedule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCustom + +`func (o *PostAlertingMaintenanceWindowRequestSchedule) GetCustom() PostAlertingMaintenanceWindowRequestScheduleCustom` + +GetCustom returns the Custom field if non-nil, zero value otherwise. + +### GetCustomOk + +`func (o *PostAlertingMaintenanceWindowRequestSchedule) GetCustomOk() (*PostAlertingMaintenanceWindowRequestScheduleCustom, bool)` + +GetCustomOk returns a tuple with the Custom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustom + +`func (o *PostAlertingMaintenanceWindowRequestSchedule) SetCustom(v PostAlertingMaintenanceWindowRequestScheduleCustom)` + +SetCustom sets Custom field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/PostAlertingMaintenanceWindowRequestScheduleCustom.md b/generated/alerting/docs/PostAlertingMaintenanceWindowRequestScheduleCustom.md new file mode 100644 index 000000000..0b2e8cd24 --- /dev/null +++ b/generated/alerting/docs/PostAlertingMaintenanceWindowRequestScheduleCustom.md @@ -0,0 +1,154 @@ +# PostAlertingMaintenanceWindowRequestScheduleCustom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Duration** | **interface{}** | The duration of the schedule. It allows values in `<integer><unit>` format. `<unit>` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`. | +**Recurring** | Pointer to [**PostAlertingMaintenanceWindowRequestScheduleCustomRecurring**](PostAlertingMaintenanceWindowRequestScheduleCustomRecurring.md) | | [optional] +**Start** | **interface{}** | The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`. | +**Timezone** | Pointer to **interface{}** | The timezone of the schedule. The default timezone is UTC. | [optional] + +## Methods + +### NewPostAlertingMaintenanceWindowRequestScheduleCustom + +`func NewPostAlertingMaintenanceWindowRequestScheduleCustom(duration interface{}, start interface{}, ) *PostAlertingMaintenanceWindowRequestScheduleCustom` + +NewPostAlertingMaintenanceWindowRequestScheduleCustom instantiates a new PostAlertingMaintenanceWindowRequestScheduleCustom object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPostAlertingMaintenanceWindowRequestScheduleCustomWithDefaults + +`func NewPostAlertingMaintenanceWindowRequestScheduleCustomWithDefaults() *PostAlertingMaintenanceWindowRequestScheduleCustom` + +NewPostAlertingMaintenanceWindowRequestScheduleCustomWithDefaults instantiates a new PostAlertingMaintenanceWindowRequestScheduleCustom object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDuration + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) GetDuration() interface{}` + +GetDuration returns the Duration field if non-nil, zero value otherwise. + +### GetDurationOk + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) GetDurationOk() (*interface{}, bool)` + +GetDurationOk returns a tuple with the Duration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDuration + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) SetDuration(v interface{})` + +SetDuration sets Duration field to given value. + + +### SetDurationNil + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) SetDurationNil(b bool)` + + SetDurationNil sets the value for Duration to be an explicit nil + +### UnsetDuration +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) UnsetDuration()` + +UnsetDuration ensures that no value is present for Duration, not even an explicit nil +### GetRecurring + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) GetRecurring() PostAlertingMaintenanceWindowRequestScheduleCustomRecurring` + +GetRecurring returns the Recurring field if non-nil, zero value otherwise. + +### GetRecurringOk + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) GetRecurringOk() (*PostAlertingMaintenanceWindowRequestScheduleCustomRecurring, bool)` + +GetRecurringOk returns a tuple with the Recurring field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurring + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) SetRecurring(v PostAlertingMaintenanceWindowRequestScheduleCustomRecurring)` + +SetRecurring sets Recurring field to given value. + +### HasRecurring + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) HasRecurring() bool` + +HasRecurring returns a boolean if a field has been set. + +### GetStart + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) GetStart() interface{}` + +GetStart returns the Start field if non-nil, zero value otherwise. + +### GetStartOk + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) GetStartOk() (*interface{}, bool)` + +GetStartOk returns a tuple with the Start field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStart + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) SetStart(v interface{})` + +SetStart sets Start field to given value. + + +### SetStartNil + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) SetStartNil(b bool)` + + SetStartNil sets the value for Start to be an explicit nil + +### UnsetStart +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) UnsetStart()` + +UnsetStart ensures that no value is present for Start, not even an explicit nil +### GetTimezone + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) GetTimezone() interface{}` + +GetTimezone returns the Timezone field if non-nil, zero value otherwise. + +### GetTimezoneOk + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) GetTimezoneOk() (*interface{}, bool)` + +GetTimezoneOk returns a tuple with the Timezone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimezone + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) SetTimezone(v interface{})` + +SetTimezone sets Timezone field to given value. + +### HasTimezone + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) HasTimezone() bool` + +HasTimezone returns a boolean if a field has been set. + +### SetTimezoneNil + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) SetTimezoneNil(b bool)` + + SetTimezoneNil sets the value for Timezone to be an explicit nil + +### UnsetTimezone +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) UnsetTimezone()` + +UnsetTimezone ensures that no value is present for Timezone, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/PostAlertingMaintenanceWindowRequestScheduleCustomRecurring.md b/generated/alerting/docs/PostAlertingMaintenanceWindowRequestScheduleCustomRecurring.md new file mode 100644 index 000000000..a9d5fb351 --- /dev/null +++ b/generated/alerting/docs/PostAlertingMaintenanceWindowRequestScheduleCustomRecurring.md @@ -0,0 +1,246 @@ +# PostAlertingMaintenanceWindowRequestScheduleCustomRecurring + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | Pointer to **interface{}** | The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`. | [optional] +**Every** | Pointer to **interface{}** | The interval and frequency of a recurring schedule. It allows values in `<integer><unit>` format. `<unit>` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`. | [optional] +**Occurrences** | Pointer to **interface{}** | The total number of recurrences of the schedule. | [optional] +**OnMonth** | Pointer to **interface{}** | The specific months for a recurring schedule. Valid values are 1-12. | [optional] +**OnMonthDay** | Pointer to **interface{}** | The specific days of the month for a recurring schedule. Valid values are 1-31. | [optional] +**OnWeekDay** | Pointer to **interface{}** | The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule. | [optional] + +## Methods + +### NewPostAlertingMaintenanceWindowRequestScheduleCustomRecurring + +`func NewPostAlertingMaintenanceWindowRequestScheduleCustomRecurring() *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring` + +NewPostAlertingMaintenanceWindowRequestScheduleCustomRecurring instantiates a new PostAlertingMaintenanceWindowRequestScheduleCustomRecurring object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPostAlertingMaintenanceWindowRequestScheduleCustomRecurringWithDefaults + +`func NewPostAlertingMaintenanceWindowRequestScheduleCustomRecurringWithDefaults() *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring` + +NewPostAlertingMaintenanceWindowRequestScheduleCustomRecurringWithDefaults instantiates a new PostAlertingMaintenanceWindowRequestScheduleCustomRecurring object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnd + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetEnd() interface{}` + +GetEnd returns the End field if non-nil, zero value otherwise. + +### GetEndOk + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetEndOk() (*interface{}, bool)` + +GetEndOk returns a tuple with the End field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnd + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetEnd(v interface{})` + +SetEnd sets End field to given value. + +### HasEnd + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) HasEnd() bool` + +HasEnd returns a boolean if a field has been set. + +### SetEndNil + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetEndNil(b bool)` + + SetEndNil sets the value for End to be an explicit nil + +### UnsetEnd +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) UnsetEnd()` + +UnsetEnd ensures that no value is present for End, not even an explicit nil +### GetEvery + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetEvery() interface{}` + +GetEvery returns the Every field if non-nil, zero value otherwise. + +### GetEveryOk + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetEveryOk() (*interface{}, bool)` + +GetEveryOk returns a tuple with the Every field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEvery + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetEvery(v interface{})` + +SetEvery sets Every field to given value. + +### HasEvery + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) HasEvery() bool` + +HasEvery returns a boolean if a field has been set. + +### SetEveryNil + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetEveryNil(b bool)` + + SetEveryNil sets the value for Every to be an explicit nil + +### UnsetEvery +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) UnsetEvery()` + +UnsetEvery ensures that no value is present for Every, not even an explicit nil +### GetOccurrences + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetOccurrences() interface{}` + +GetOccurrences returns the Occurrences field if non-nil, zero value otherwise. + +### GetOccurrencesOk + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetOccurrencesOk() (*interface{}, bool)` + +GetOccurrencesOk returns a tuple with the Occurrences field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOccurrences + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetOccurrences(v interface{})` + +SetOccurrences sets Occurrences field to given value. + +### HasOccurrences + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) HasOccurrences() bool` + +HasOccurrences returns a boolean if a field has been set. + +### SetOccurrencesNil + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetOccurrencesNil(b bool)` + + SetOccurrencesNil sets the value for Occurrences to be an explicit nil + +### UnsetOccurrences +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) UnsetOccurrences()` + +UnsetOccurrences ensures that no value is present for Occurrences, not even an explicit nil +### GetOnMonth + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonth() interface{}` + +GetOnMonth returns the OnMonth field if non-nil, zero value otherwise. + +### GetOnMonthOk + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthOk() (*interface{}, bool)` + +GetOnMonthOk returns a tuple with the OnMonth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnMonth + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetOnMonth(v interface{})` + +SetOnMonth sets OnMonth field to given value. + +### HasOnMonth + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) HasOnMonth() bool` + +HasOnMonth returns a boolean if a field has been set. + +### SetOnMonthNil + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetOnMonthNil(b bool)` + + SetOnMonthNil sets the value for OnMonth to be an explicit nil + +### UnsetOnMonth +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) UnsetOnMonth()` + +UnsetOnMonth ensures that no value is present for OnMonth, not even an explicit nil +### GetOnMonthDay + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthDay() interface{}` + +GetOnMonthDay returns the OnMonthDay field if non-nil, zero value otherwise. + +### GetOnMonthDayOk + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthDayOk() (*interface{}, bool)` + +GetOnMonthDayOk returns a tuple with the OnMonthDay field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnMonthDay + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetOnMonthDay(v interface{})` + +SetOnMonthDay sets OnMonthDay field to given value. + +### HasOnMonthDay + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) HasOnMonthDay() bool` + +HasOnMonthDay returns a boolean if a field has been set. + +### SetOnMonthDayNil + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetOnMonthDayNil(b bool)` + + SetOnMonthDayNil sets the value for OnMonthDay to be an explicit nil + +### UnsetOnMonthDay +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) UnsetOnMonthDay()` + +UnsetOnMonthDay ensures that no value is present for OnMonthDay, not even an explicit nil +### GetOnWeekDay + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetOnWeekDay() interface{}` + +GetOnWeekDay returns the OnWeekDay field if non-nil, zero value otherwise. + +### GetOnWeekDayOk + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetOnWeekDayOk() (*interface{}, bool)` + +GetOnWeekDayOk returns a tuple with the OnWeekDay field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnWeekDay + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetOnWeekDay(v interface{})` + +SetOnWeekDay sets OnWeekDay field to given value. + +### HasOnWeekDay + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) HasOnWeekDay() bool` + +HasOnWeekDay returns a boolean if a field has been set. + +### SetOnWeekDayNil + +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetOnWeekDayNil(b bool)` + + SetOnWeekDayNil sets the value for OnWeekDay to be an explicit nil + +### UnsetOnWeekDay +`func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) UnsetOnWeekDay()` + +UnsetOnWeekDay ensures that no value is present for OnWeekDay, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/PostAlertingMaintenanceWindowRequestScope.md b/generated/alerting/docs/PostAlertingMaintenanceWindowRequestScope.md new file mode 100644 index 000000000..2177dc26d --- /dev/null +++ b/generated/alerting/docs/PostAlertingMaintenanceWindowRequestScope.md @@ -0,0 +1,51 @@ +# PostAlertingMaintenanceWindowRequestScope + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Alerting** | [**PostAlertingMaintenanceWindowRequestScopeAlerting**](PostAlertingMaintenanceWindowRequestScopeAlerting.md) | | + +## Methods + +### NewPostAlertingMaintenanceWindowRequestScope + +`func NewPostAlertingMaintenanceWindowRequestScope(alerting PostAlertingMaintenanceWindowRequestScopeAlerting, ) *PostAlertingMaintenanceWindowRequestScope` + +NewPostAlertingMaintenanceWindowRequestScope instantiates a new PostAlertingMaintenanceWindowRequestScope object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPostAlertingMaintenanceWindowRequestScopeWithDefaults + +`func NewPostAlertingMaintenanceWindowRequestScopeWithDefaults() *PostAlertingMaintenanceWindowRequestScope` + +NewPostAlertingMaintenanceWindowRequestScopeWithDefaults instantiates a new PostAlertingMaintenanceWindowRequestScope object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAlerting + +`func (o *PostAlertingMaintenanceWindowRequestScope) GetAlerting() PostAlertingMaintenanceWindowRequestScopeAlerting` + +GetAlerting returns the Alerting field if non-nil, zero value otherwise. + +### GetAlertingOk + +`func (o *PostAlertingMaintenanceWindowRequestScope) GetAlertingOk() (*PostAlertingMaintenanceWindowRequestScopeAlerting, bool)` + +GetAlertingOk returns a tuple with the Alerting field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlerting + +`func (o *PostAlertingMaintenanceWindowRequestScope) SetAlerting(v PostAlertingMaintenanceWindowRequestScopeAlerting)` + +SetAlerting sets Alerting field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/PostAlertingMaintenanceWindowRequestScopeAlerting.md b/generated/alerting/docs/PostAlertingMaintenanceWindowRequestScopeAlerting.md new file mode 100644 index 000000000..3ca6c9d34 --- /dev/null +++ b/generated/alerting/docs/PostAlertingMaintenanceWindowRequestScopeAlerting.md @@ -0,0 +1,51 @@ +# PostAlertingMaintenanceWindowRequestScopeAlerting + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Query** | [**PostAlertingMaintenanceWindowRequestScopeAlertingQuery**](PostAlertingMaintenanceWindowRequestScopeAlertingQuery.md) | | + +## Methods + +### NewPostAlertingMaintenanceWindowRequestScopeAlerting + +`func NewPostAlertingMaintenanceWindowRequestScopeAlerting(query PostAlertingMaintenanceWindowRequestScopeAlertingQuery, ) *PostAlertingMaintenanceWindowRequestScopeAlerting` + +NewPostAlertingMaintenanceWindowRequestScopeAlerting instantiates a new PostAlertingMaintenanceWindowRequestScopeAlerting object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPostAlertingMaintenanceWindowRequestScopeAlertingWithDefaults + +`func NewPostAlertingMaintenanceWindowRequestScopeAlertingWithDefaults() *PostAlertingMaintenanceWindowRequestScopeAlerting` + +NewPostAlertingMaintenanceWindowRequestScopeAlertingWithDefaults instantiates a new PostAlertingMaintenanceWindowRequestScopeAlerting object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetQuery + +`func (o *PostAlertingMaintenanceWindowRequestScopeAlerting) GetQuery() PostAlertingMaintenanceWindowRequestScopeAlertingQuery` + +GetQuery returns the Query field if non-nil, zero value otherwise. + +### GetQueryOk + +`func (o *PostAlertingMaintenanceWindowRequestScopeAlerting) GetQueryOk() (*PostAlertingMaintenanceWindowRequestScopeAlertingQuery, bool)` + +GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuery + +`func (o *PostAlertingMaintenanceWindowRequestScopeAlerting) SetQuery(v PostAlertingMaintenanceWindowRequestScopeAlertingQuery)` + +SetQuery sets Query field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/PostAlertingMaintenanceWindowRequestScopeAlertingQuery.md b/generated/alerting/docs/PostAlertingMaintenanceWindowRequestScopeAlertingQuery.md new file mode 100644 index 000000000..66f356634 --- /dev/null +++ b/generated/alerting/docs/PostAlertingMaintenanceWindowRequestScopeAlertingQuery.md @@ -0,0 +1,61 @@ +# PostAlertingMaintenanceWindowRequestScopeAlertingQuery + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kql** | **interface{}** | A filter written in Kibana Query Language (KQL). | + +## Methods + +### NewPostAlertingMaintenanceWindowRequestScopeAlertingQuery + +`func NewPostAlertingMaintenanceWindowRequestScopeAlertingQuery(kql interface{}, ) *PostAlertingMaintenanceWindowRequestScopeAlertingQuery` + +NewPostAlertingMaintenanceWindowRequestScopeAlertingQuery instantiates a new PostAlertingMaintenanceWindowRequestScopeAlertingQuery object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPostAlertingMaintenanceWindowRequestScopeAlertingQueryWithDefaults + +`func NewPostAlertingMaintenanceWindowRequestScopeAlertingQueryWithDefaults() *PostAlertingMaintenanceWindowRequestScopeAlertingQuery` + +NewPostAlertingMaintenanceWindowRequestScopeAlertingQueryWithDefaults instantiates a new PostAlertingMaintenanceWindowRequestScopeAlertingQuery object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetKql + +`func (o *PostAlertingMaintenanceWindowRequestScopeAlertingQuery) GetKql() interface{}` + +GetKql returns the Kql field if non-nil, zero value otherwise. + +### GetKqlOk + +`func (o *PostAlertingMaintenanceWindowRequestScopeAlertingQuery) GetKqlOk() (*interface{}, bool)` + +GetKqlOk returns a tuple with the Kql field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKql + +`func (o *PostAlertingMaintenanceWindowRequestScopeAlertingQuery) SetKql(v interface{})` + +SetKql sets Kql field to given value. + + +### SetKqlNil + +`func (o *PostAlertingMaintenanceWindowRequestScopeAlertingQuery) SetKqlNil(b bool)` + + SetKqlNil sets the value for Kql to be an explicit nil + +### UnsetKql +`func (o *PostAlertingMaintenanceWindowRequestScopeAlertingQuery) UnsetKql()` + +UnsetKql ensures that no value is present for Kql, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/UpdateMaintenanceWindowRequest.md b/generated/alerting/docs/UpdateMaintenanceWindowRequest.md new file mode 100644 index 000000000..893296807 --- /dev/null +++ b/generated/alerting/docs/UpdateMaintenanceWindowRequest.md @@ -0,0 +1,134 @@ +# UpdateMaintenanceWindowRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. | [optional] +**Schedule** | Pointer to [**CreateMaintenanceWindowRequestSchedule**](CreateMaintenanceWindowRequestSchedule.md) | | [optional] +**Scope** | Pointer to [**CreateMaintenanceWindowRequestScope**](CreateMaintenanceWindowRequestScope.md) | | [optional] +**Title** | Pointer to **string** | The name of the maintenance window. While this name does not have to be unique, a distinctive name can help you identify a specific maintenance window. | [optional] + +## Methods + +### NewUpdateMaintenanceWindowRequest + +`func NewUpdateMaintenanceWindowRequest() *UpdateMaintenanceWindowRequest` + +NewUpdateMaintenanceWindowRequest instantiates a new UpdateMaintenanceWindowRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateMaintenanceWindowRequestWithDefaults + +`func NewUpdateMaintenanceWindowRequestWithDefaults() *UpdateMaintenanceWindowRequest` + +NewUpdateMaintenanceWindowRequestWithDefaults instantiates a new UpdateMaintenanceWindowRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *UpdateMaintenanceWindowRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *UpdateMaintenanceWindowRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *UpdateMaintenanceWindowRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *UpdateMaintenanceWindowRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetSchedule + +`func (o *UpdateMaintenanceWindowRequest) GetSchedule() CreateMaintenanceWindowRequestSchedule` + +GetSchedule returns the Schedule field if non-nil, zero value otherwise. + +### GetScheduleOk + +`func (o *UpdateMaintenanceWindowRequest) GetScheduleOk() (*CreateMaintenanceWindowRequestSchedule, bool)` + +GetScheduleOk returns a tuple with the Schedule field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSchedule + +`func (o *UpdateMaintenanceWindowRequest) SetSchedule(v CreateMaintenanceWindowRequestSchedule)` + +SetSchedule sets Schedule field to given value. + +### HasSchedule + +`func (o *UpdateMaintenanceWindowRequest) HasSchedule() bool` + +HasSchedule returns a boolean if a field has been set. + +### GetScope + +`func (o *UpdateMaintenanceWindowRequest) GetScope() CreateMaintenanceWindowRequestScope` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *UpdateMaintenanceWindowRequest) GetScopeOk() (*CreateMaintenanceWindowRequestScope, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *UpdateMaintenanceWindowRequest) SetScope(v CreateMaintenanceWindowRequestScope)` + +SetScope sets Scope field to given value. + +### HasScope + +`func (o *UpdateMaintenanceWindowRequest) HasScope() bool` + +HasScope returns a boolean if a field has been set. + +### GetTitle + +`func (o *UpdateMaintenanceWindowRequest) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *UpdateMaintenanceWindowRequest) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *UpdateMaintenanceWindowRequest) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *UpdateMaintenanceWindowRequest) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/UpdateMaintenanceWindowRequestSchedule.md b/generated/alerting/docs/UpdateMaintenanceWindowRequestSchedule.md new file mode 100644 index 000000000..b8315ff51 --- /dev/null +++ b/generated/alerting/docs/UpdateMaintenanceWindowRequestSchedule.md @@ -0,0 +1,51 @@ +# UpdateMaintenanceWindowRequestSchedule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Custom** | [**UpdateMaintenanceWindowRequestScheduleCustom**](UpdateMaintenanceWindowRequestScheduleCustom.md) | | + +## Methods + +### NewUpdateMaintenanceWindowRequestSchedule + +`func NewUpdateMaintenanceWindowRequestSchedule(custom UpdateMaintenanceWindowRequestScheduleCustom, ) *UpdateMaintenanceWindowRequestSchedule` + +NewUpdateMaintenanceWindowRequestSchedule instantiates a new UpdateMaintenanceWindowRequestSchedule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateMaintenanceWindowRequestScheduleWithDefaults + +`func NewUpdateMaintenanceWindowRequestScheduleWithDefaults() *UpdateMaintenanceWindowRequestSchedule` + +NewUpdateMaintenanceWindowRequestScheduleWithDefaults instantiates a new UpdateMaintenanceWindowRequestSchedule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCustom + +`func (o *UpdateMaintenanceWindowRequestSchedule) GetCustom() UpdateMaintenanceWindowRequestScheduleCustom` + +GetCustom returns the Custom field if non-nil, zero value otherwise. + +### GetCustomOk + +`func (o *UpdateMaintenanceWindowRequestSchedule) GetCustomOk() (*UpdateMaintenanceWindowRequestScheduleCustom, bool)` + +GetCustomOk returns a tuple with the Custom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustom + +`func (o *UpdateMaintenanceWindowRequestSchedule) SetCustom(v UpdateMaintenanceWindowRequestScheduleCustom)` + +SetCustom sets Custom field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/UpdateMaintenanceWindowRequestScheduleCustom.md b/generated/alerting/docs/UpdateMaintenanceWindowRequestScheduleCustom.md new file mode 100644 index 000000000..35b46c927 --- /dev/null +++ b/generated/alerting/docs/UpdateMaintenanceWindowRequestScheduleCustom.md @@ -0,0 +1,124 @@ +# UpdateMaintenanceWindowRequestScheduleCustom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Duration** | **string** | The duration of the schedule. It allows values in `<integer><unit>` format. `<unit>` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`. | +**Recurring** | Pointer to [**UpdateMaintenanceWindowRequestScheduleCustomRecurring**](UpdateMaintenanceWindowRequestScheduleCustomRecurring.md) | | [optional] +**Start** | **string** | The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`. | +**Timezone** | Pointer to **string** | The timezone of the schedule. The default timezone is UTC. | [optional] + +## Methods + +### NewUpdateMaintenanceWindowRequestScheduleCustom + +`func NewUpdateMaintenanceWindowRequestScheduleCustom(duration string, start string, ) *UpdateMaintenanceWindowRequestScheduleCustom` + +NewUpdateMaintenanceWindowRequestScheduleCustom instantiates a new UpdateMaintenanceWindowRequestScheduleCustom object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateMaintenanceWindowRequestScheduleCustomWithDefaults + +`func NewUpdateMaintenanceWindowRequestScheduleCustomWithDefaults() *UpdateMaintenanceWindowRequestScheduleCustom` + +NewUpdateMaintenanceWindowRequestScheduleCustomWithDefaults instantiates a new UpdateMaintenanceWindowRequestScheduleCustom object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDuration + +`func (o *UpdateMaintenanceWindowRequestScheduleCustom) GetDuration() string` + +GetDuration returns the Duration field if non-nil, zero value otherwise. + +### GetDurationOk + +`func (o *UpdateMaintenanceWindowRequestScheduleCustom) GetDurationOk() (*string, bool)` + +GetDurationOk returns a tuple with the Duration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDuration + +`func (o *UpdateMaintenanceWindowRequestScheduleCustom) SetDuration(v string)` + +SetDuration sets Duration field to given value. + + +### GetRecurring + +`func (o *UpdateMaintenanceWindowRequestScheduleCustom) GetRecurring() UpdateMaintenanceWindowRequestScheduleCustomRecurring` + +GetRecurring returns the Recurring field if non-nil, zero value otherwise. + +### GetRecurringOk + +`func (o *UpdateMaintenanceWindowRequestScheduleCustom) GetRecurringOk() (*UpdateMaintenanceWindowRequestScheduleCustomRecurring, bool)` + +GetRecurringOk returns a tuple with the Recurring field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecurring + +`func (o *UpdateMaintenanceWindowRequestScheduleCustom) SetRecurring(v UpdateMaintenanceWindowRequestScheduleCustomRecurring)` + +SetRecurring sets Recurring field to given value. + +### HasRecurring + +`func (o *UpdateMaintenanceWindowRequestScheduleCustom) HasRecurring() bool` + +HasRecurring returns a boolean if a field has been set. + +### GetStart + +`func (o *UpdateMaintenanceWindowRequestScheduleCustom) GetStart() string` + +GetStart returns the Start field if non-nil, zero value otherwise. + +### GetStartOk + +`func (o *UpdateMaintenanceWindowRequestScheduleCustom) GetStartOk() (*string, bool)` + +GetStartOk returns a tuple with the Start field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStart + +`func (o *UpdateMaintenanceWindowRequestScheduleCustom) SetStart(v string)` + +SetStart sets Start field to given value. + + +### GetTimezone + +`func (o *UpdateMaintenanceWindowRequestScheduleCustom) GetTimezone() string` + +GetTimezone returns the Timezone field if non-nil, zero value otherwise. + +### GetTimezoneOk + +`func (o *UpdateMaintenanceWindowRequestScheduleCustom) GetTimezoneOk() (*string, bool)` + +GetTimezoneOk returns a tuple with the Timezone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimezone + +`func (o *UpdateMaintenanceWindowRequestScheduleCustom) SetTimezone(v string)` + +SetTimezone sets Timezone field to given value. + +### HasTimezone + +`func (o *UpdateMaintenanceWindowRequestScheduleCustom) HasTimezone() bool` + +HasTimezone returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/UpdateMaintenanceWindowRequestScheduleCustomRecurring.md b/generated/alerting/docs/UpdateMaintenanceWindowRequestScheduleCustomRecurring.md new file mode 100644 index 000000000..da9879a2f --- /dev/null +++ b/generated/alerting/docs/UpdateMaintenanceWindowRequestScheduleCustomRecurring.md @@ -0,0 +1,216 @@ +# UpdateMaintenanceWindowRequestScheduleCustomRecurring + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | Pointer to **string** | The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`. | [optional] +**Every** | Pointer to **string** | The interval and frequency of a recurring schedule. It allows values in `<integer><unit>` format. `<unit>` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`. | [optional] +**Occurrences** | Pointer to **float32** | The total number of recurrences of the schedule. | [optional] +**OnMonth** | Pointer to **interface{}** | The specific months for a recurring schedule. Valid values are 1-12. | [optional] +**OnMonthDay** | Pointer to **interface{}** | The specific days of the month for a recurring schedule. Valid values are 1-31. | [optional] +**OnWeekDay** | Pointer to **interface{}** | The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule. | [optional] + +## Methods + +### NewUpdateMaintenanceWindowRequestScheduleCustomRecurring + +`func NewUpdateMaintenanceWindowRequestScheduleCustomRecurring() *UpdateMaintenanceWindowRequestScheduleCustomRecurring` + +NewUpdateMaintenanceWindowRequestScheduleCustomRecurring instantiates a new UpdateMaintenanceWindowRequestScheduleCustomRecurring object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateMaintenanceWindowRequestScheduleCustomRecurringWithDefaults + +`func NewUpdateMaintenanceWindowRequestScheduleCustomRecurringWithDefaults() *UpdateMaintenanceWindowRequestScheduleCustomRecurring` + +NewUpdateMaintenanceWindowRequestScheduleCustomRecurringWithDefaults instantiates a new UpdateMaintenanceWindowRequestScheduleCustomRecurring object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnd + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetEnd() string` + +GetEnd returns the End field if non-nil, zero value otherwise. + +### GetEndOk + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetEndOk() (*string, bool)` + +GetEndOk returns a tuple with the End field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnd + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) SetEnd(v string)` + +SetEnd sets End field to given value. + +### HasEnd + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) HasEnd() bool` + +HasEnd returns a boolean if a field has been set. + +### GetEvery + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetEvery() string` + +GetEvery returns the Every field if non-nil, zero value otherwise. + +### GetEveryOk + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetEveryOk() (*string, bool)` + +GetEveryOk returns a tuple with the Every field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEvery + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) SetEvery(v string)` + +SetEvery sets Every field to given value. + +### HasEvery + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) HasEvery() bool` + +HasEvery returns a boolean if a field has been set. + +### GetOccurrences + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetOccurrences() float32` + +GetOccurrences returns the Occurrences field if non-nil, zero value otherwise. + +### GetOccurrencesOk + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetOccurrencesOk() (*float32, bool)` + +GetOccurrencesOk returns a tuple with the Occurrences field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOccurrences + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) SetOccurrences(v float32)` + +SetOccurrences sets Occurrences field to given value. + +### HasOccurrences + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) HasOccurrences() bool` + +HasOccurrences returns a boolean if a field has been set. + +### GetOnMonth + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonth() interface{}` + +GetOnMonth returns the OnMonth field if non-nil, zero value otherwise. + +### GetOnMonthOk + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthOk() (*interface{}, bool)` + +GetOnMonthOk returns a tuple with the OnMonth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnMonth + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) SetOnMonth(v interface{})` + +SetOnMonth sets OnMonth field to given value. + +### HasOnMonth + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) HasOnMonth() bool` + +HasOnMonth returns a boolean if a field has been set. + +### SetOnMonthNil + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) SetOnMonthNil(b bool)` + + SetOnMonthNil sets the value for OnMonth to be an explicit nil + +### UnsetOnMonth +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) UnsetOnMonth()` + +UnsetOnMonth ensures that no value is present for OnMonth, not even an explicit nil +### GetOnMonthDay + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthDay() interface{}` + +GetOnMonthDay returns the OnMonthDay field if non-nil, zero value otherwise. + +### GetOnMonthDayOk + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthDayOk() (*interface{}, bool)` + +GetOnMonthDayOk returns a tuple with the OnMonthDay field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnMonthDay + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) SetOnMonthDay(v interface{})` + +SetOnMonthDay sets OnMonthDay field to given value. + +### HasOnMonthDay + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) HasOnMonthDay() bool` + +HasOnMonthDay returns a boolean if a field has been set. + +### SetOnMonthDayNil + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) SetOnMonthDayNil(b bool)` + + SetOnMonthDayNil sets the value for OnMonthDay to be an explicit nil + +### UnsetOnMonthDay +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) UnsetOnMonthDay()` + +UnsetOnMonthDay ensures that no value is present for OnMonthDay, not even an explicit nil +### GetOnWeekDay + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetOnWeekDay() interface{}` + +GetOnWeekDay returns the OnWeekDay field if non-nil, zero value otherwise. + +### GetOnWeekDayOk + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetOnWeekDayOk() (*interface{}, bool)` + +GetOnWeekDayOk returns a tuple with the OnWeekDay field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnWeekDay + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) SetOnWeekDay(v interface{})` + +SetOnWeekDay sets OnWeekDay field to given value. + +### HasOnWeekDay + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) HasOnWeekDay() bool` + +HasOnWeekDay returns a boolean if a field has been set. + +### SetOnWeekDayNil + +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) SetOnWeekDayNil(b bool)` + + SetOnWeekDayNil sets the value for OnWeekDay to be an explicit nil + +### UnsetOnWeekDay +`func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) UnsetOnWeekDay()` + +UnsetOnWeekDay ensures that no value is present for OnWeekDay, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/UpdateMaintenanceWindowRequestScope.md b/generated/alerting/docs/UpdateMaintenanceWindowRequestScope.md new file mode 100644 index 000000000..7af5a27c2 --- /dev/null +++ b/generated/alerting/docs/UpdateMaintenanceWindowRequestScope.md @@ -0,0 +1,51 @@ +# UpdateMaintenanceWindowRequestScope + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Alerting** | [**UpdateMaintenanceWindowRequestScopeAlerting**](UpdateMaintenanceWindowRequestScopeAlerting.md) | | + +## Methods + +### NewUpdateMaintenanceWindowRequestScope + +`func NewUpdateMaintenanceWindowRequestScope(alerting UpdateMaintenanceWindowRequestScopeAlerting, ) *UpdateMaintenanceWindowRequestScope` + +NewUpdateMaintenanceWindowRequestScope instantiates a new UpdateMaintenanceWindowRequestScope object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateMaintenanceWindowRequestScopeWithDefaults + +`func NewUpdateMaintenanceWindowRequestScopeWithDefaults() *UpdateMaintenanceWindowRequestScope` + +NewUpdateMaintenanceWindowRequestScopeWithDefaults instantiates a new UpdateMaintenanceWindowRequestScope object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAlerting + +`func (o *UpdateMaintenanceWindowRequestScope) GetAlerting() UpdateMaintenanceWindowRequestScopeAlerting` + +GetAlerting returns the Alerting field if non-nil, zero value otherwise. + +### GetAlertingOk + +`func (o *UpdateMaintenanceWindowRequestScope) GetAlertingOk() (*UpdateMaintenanceWindowRequestScopeAlerting, bool)` + +GetAlertingOk returns a tuple with the Alerting field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlerting + +`func (o *UpdateMaintenanceWindowRequestScope) SetAlerting(v UpdateMaintenanceWindowRequestScopeAlerting)` + +SetAlerting sets Alerting field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/UpdateMaintenanceWindowRequestScopeAlerting.md b/generated/alerting/docs/UpdateMaintenanceWindowRequestScopeAlerting.md new file mode 100644 index 000000000..afc089d1f --- /dev/null +++ b/generated/alerting/docs/UpdateMaintenanceWindowRequestScopeAlerting.md @@ -0,0 +1,51 @@ +# UpdateMaintenanceWindowRequestScopeAlerting + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Query** | [**UpdateMaintenanceWindowRequestScopeAlertingQuery**](UpdateMaintenanceWindowRequestScopeAlertingQuery.md) | | + +## Methods + +### NewUpdateMaintenanceWindowRequestScopeAlerting + +`func NewUpdateMaintenanceWindowRequestScopeAlerting(query UpdateMaintenanceWindowRequestScopeAlertingQuery, ) *UpdateMaintenanceWindowRequestScopeAlerting` + +NewUpdateMaintenanceWindowRequestScopeAlerting instantiates a new UpdateMaintenanceWindowRequestScopeAlerting object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateMaintenanceWindowRequestScopeAlertingWithDefaults + +`func NewUpdateMaintenanceWindowRequestScopeAlertingWithDefaults() *UpdateMaintenanceWindowRequestScopeAlerting` + +NewUpdateMaintenanceWindowRequestScopeAlertingWithDefaults instantiates a new UpdateMaintenanceWindowRequestScopeAlerting object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetQuery + +`func (o *UpdateMaintenanceWindowRequestScopeAlerting) GetQuery() UpdateMaintenanceWindowRequestScopeAlertingQuery` + +GetQuery returns the Query field if non-nil, zero value otherwise. + +### GetQueryOk + +`func (o *UpdateMaintenanceWindowRequestScopeAlerting) GetQueryOk() (*UpdateMaintenanceWindowRequestScopeAlertingQuery, bool)` + +GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuery + +`func (o *UpdateMaintenanceWindowRequestScopeAlerting) SetQuery(v UpdateMaintenanceWindowRequestScopeAlertingQuery)` + +SetQuery sets Query field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/docs/UpdateMaintenanceWindowRequestScopeAlertingQuery.md b/generated/alerting/docs/UpdateMaintenanceWindowRequestScopeAlertingQuery.md new file mode 100644 index 000000000..708c42fcf --- /dev/null +++ b/generated/alerting/docs/UpdateMaintenanceWindowRequestScopeAlertingQuery.md @@ -0,0 +1,51 @@ +# UpdateMaintenanceWindowRequestScopeAlertingQuery + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kql** | **string** | A filter written in Kibana Query Language (KQL). | + +## Methods + +### NewUpdateMaintenanceWindowRequestScopeAlertingQuery + +`func NewUpdateMaintenanceWindowRequestScopeAlertingQuery(kql string, ) *UpdateMaintenanceWindowRequestScopeAlertingQuery` + +NewUpdateMaintenanceWindowRequestScopeAlertingQuery instantiates a new UpdateMaintenanceWindowRequestScopeAlertingQuery object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateMaintenanceWindowRequestScopeAlertingQueryWithDefaults + +`func NewUpdateMaintenanceWindowRequestScopeAlertingQueryWithDefaults() *UpdateMaintenanceWindowRequestScopeAlertingQuery` + +NewUpdateMaintenanceWindowRequestScopeAlertingQueryWithDefaults instantiates a new UpdateMaintenanceWindowRequestScopeAlertingQuery object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetKql + +`func (o *UpdateMaintenanceWindowRequestScopeAlertingQuery) GetKql() string` + +GetKql returns the Kql field if non-nil, zero value otherwise. + +### GetKqlOk + +`func (o *UpdateMaintenanceWindowRequestScopeAlertingQuery) GetKqlOk() (*string, bool)` + +GetKqlOk returns a tuple with the Kql field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKql + +`func (o *UpdateMaintenanceWindowRequestScopeAlertingQuery) SetKql(v string)` + +SetKql sets Kql field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/alerting/model_403_response.go b/generated/alerting/model_403_response.go new file mode 100644 index 000000000..bd3953cc9 --- /dev/null +++ b/generated/alerting/model_403_response.go @@ -0,0 +1,199 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the Model403Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Model403Response{} + +// Model403Response struct for Model403Response +type Model403Response struct { + // Error status code + StatusCode *float32 `json:"statusCode,omitempty"` + // Error type + Error *string `json:"error,omitempty"` + // Error message + Message *string `json:"message,omitempty"` +} + +// NewModel403Response instantiates a new Model403Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewModel403Response() *Model403Response { + this := Model403Response{} + return &this +} + +// NewModel403ResponseWithDefaults instantiates a new Model403Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewModel403ResponseWithDefaults() *Model403Response { + this := Model403Response{} + return &this +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *Model403Response) GetStatusCode() float32 { + if o == nil || IsNil(o.StatusCode) { + var ret float32 + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Model403Response) GetStatusCodeOk() (*float32, bool) { + if o == nil || IsNil(o.StatusCode) { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *Model403Response) HasStatusCode() bool { + if o != nil && !IsNil(o.StatusCode) { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given float32 and assigns it to the StatusCode field. +func (o *Model403Response) SetStatusCode(v float32) { + o.StatusCode = &v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *Model403Response) GetError() string { + if o == nil || IsNil(o.Error) { + var ret string + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Model403Response) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *Model403Response) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *Model403Response) SetError(v string) { + o.Error = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Model403Response) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Model403Response) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *Model403Response) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *Model403Response) SetMessage(v string) { + o.Message = &v +} + +func (o Model403Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Model403Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.StatusCode) { + toSerialize["statusCode"] = o.StatusCode + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableModel403Response struct { + value *Model403Response + isSet bool +} + +func (v NullableModel403Response) Get() *Model403Response { + return v.value +} + +func (v *NullableModel403Response) Set(val *Model403Response) { + v.value = val + v.isSet = true +} + +func (v NullableModel403Response) IsSet() bool { + return v.isSet +} + +func (v *NullableModel403Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableModel403Response(val *Model403Response) *NullableModel403Response { + return &NullableModel403Response{value: val, isSet: true} +} + +func (v NullableModel403Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableModel403Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_actions_inner_frequency.go b/generated/alerting/model_actions_inner_frequency.go index 2bf2be63d..b91517377 100644 --- a/generated/alerting/model_actions_inner_frequency.go +++ b/generated/alerting/model_actions_inner_frequency.go @@ -19,7 +19,7 @@ var _ MappedNullable = &ActionsInnerFrequency{} // ActionsInnerFrequency The properties that affect how often actions are generated. If the rule type supports setting `summary` to `true`, the action can be a summary of alerts at the specified notification interval. Otherwise, an action runs for each alert at the specified notification interval. NOTE: You cannot specify these parameters when `notify_when` or `throttle` are defined at the rule level. type ActionsInnerFrequency struct { - NotifyWhen NotifyWhen `json:"notify_when"` + NotifyWhen NotifyWhenAction `json:"notify_when"` // Indicates whether the action is a summary. Summary bool `json:"summary"` // The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if `notify_when` is set to `onThrottleInterval`. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values. @@ -30,7 +30,7 @@ type ActionsInnerFrequency struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewActionsInnerFrequency(notifyWhen NotifyWhen, summary bool) *ActionsInnerFrequency { +func NewActionsInnerFrequency(notifyWhen NotifyWhenAction, summary bool) *ActionsInnerFrequency { this := ActionsInnerFrequency{} this.NotifyWhen = notifyWhen this.Summary = summary @@ -46,9 +46,9 @@ func NewActionsInnerFrequencyWithDefaults() *ActionsInnerFrequency { } // GetNotifyWhen returns the NotifyWhen field value -func (o *ActionsInnerFrequency) GetNotifyWhen() NotifyWhen { +func (o *ActionsInnerFrequency) GetNotifyWhen() NotifyWhenAction { if o == nil { - var ret NotifyWhen + var ret NotifyWhenAction return ret } @@ -57,7 +57,7 @@ func (o *ActionsInnerFrequency) GetNotifyWhen() NotifyWhen { // GetNotifyWhenOk returns a tuple with the NotifyWhen field value // and a boolean to check if the value has been set. -func (o *ActionsInnerFrequency) GetNotifyWhenOk() (*NotifyWhen, bool) { +func (o *ActionsInnerFrequency) GetNotifyWhenOk() (*NotifyWhenAction, bool) { if o == nil { return nil, false } @@ -65,7 +65,7 @@ func (o *ActionsInnerFrequency) GetNotifyWhenOk() (*NotifyWhen, bool) { } // SetNotifyWhen sets field value -func (o *ActionsInnerFrequency) SetNotifyWhen(v NotifyWhen) { +func (o *ActionsInnerFrequency) SetNotifyWhen(v NotifyWhenAction) { o.NotifyWhen = v } diff --git a/generated/alerting/model_create_maintenance_window_200_response.go b/generated/alerting/model_create_maintenance_window_200_response.go new file mode 100644 index 000000000..76fd57499 --- /dev/null +++ b/generated/alerting/model_create_maintenance_window_200_response.go @@ -0,0 +1,445 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the CreateMaintenanceWindow200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateMaintenanceWindow200Response{} + +// CreateMaintenanceWindow200Response struct for CreateMaintenanceWindow200Response +type CreateMaintenanceWindow200Response struct { + // The date and time when the maintenance window was created. + CreatedAt interface{} `json:"created_at"` + // The identifier for the user that created the maintenance window. + CreatedBy interface{} `json:"created_by"` + // Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. + Enabled interface{} `json:"enabled"` + // The identifier for the maintenance window. + Id interface{} `json:"id"` + Schedule CreateMaintenanceWindow200ResponseSchedule `json:"schedule"` + Scope *CreateMaintenanceWindowRequestScope `json:"scope,omitempty"` + // The current status of the maintenance window. + Status interface{} `json:"status"` + // The name of the maintenance window. + Title interface{} `json:"title"` + // The date and time when the maintenance window was last updated. + UpdatedAt interface{} `json:"updated_at"` + // The identifier for the user that last updated this maintenance window. + UpdatedBy interface{} `json:"updated_by"` + AdditionalProperties map[string]interface{} +} + +type _CreateMaintenanceWindow200Response CreateMaintenanceWindow200Response + +// NewCreateMaintenanceWindow200Response instantiates a new CreateMaintenanceWindow200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateMaintenanceWindow200Response(createdAt interface{}, createdBy interface{}, enabled interface{}, id interface{}, schedule CreateMaintenanceWindow200ResponseSchedule, status interface{}, title interface{}, updatedAt interface{}, updatedBy interface{}) *CreateMaintenanceWindow200Response { + this := CreateMaintenanceWindow200Response{} + this.CreatedAt = createdAt + this.CreatedBy = createdBy + this.Enabled = enabled + this.Id = id + this.Schedule = schedule + this.Status = status + this.Title = title + this.UpdatedAt = updatedAt + this.UpdatedBy = updatedBy + return &this +} + +// NewCreateMaintenanceWindow200ResponseWithDefaults instantiates a new CreateMaintenanceWindow200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateMaintenanceWindow200ResponseWithDefaults() *CreateMaintenanceWindow200Response { + this := CreateMaintenanceWindow200Response{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *CreateMaintenanceWindow200Response) GetCreatedAt() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200Response) GetCreatedAtOk() (*interface{}, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CreateMaintenanceWindow200Response) SetCreatedAt(v interface{}) { + o.CreatedAt = v +} + +// GetCreatedBy returns the CreatedBy field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *CreateMaintenanceWindow200Response) GetCreatedBy() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.CreatedBy +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200Response) GetCreatedByOk() (*interface{}, bool) { + if o == nil || IsNil(o.CreatedBy) { + return nil, false + } + return &o.CreatedBy, true +} + +// SetCreatedBy sets field value +func (o *CreateMaintenanceWindow200Response) SetCreatedBy(v interface{}) { + o.CreatedBy = v +} + +// GetEnabled returns the Enabled field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *CreateMaintenanceWindow200Response) GetEnabled() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200Response) GetEnabledOk() (*interface{}, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *CreateMaintenanceWindow200Response) SetEnabled(v interface{}) { + o.Enabled = v +} + +// GetId returns the Id field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *CreateMaintenanceWindow200Response) GetId() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200Response) GetIdOk() (*interface{}, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CreateMaintenanceWindow200Response) SetId(v interface{}) { + o.Id = v +} + +// GetSchedule returns the Schedule field value +func (o *CreateMaintenanceWindow200Response) GetSchedule() CreateMaintenanceWindow200ResponseSchedule { + if o == nil { + var ret CreateMaintenanceWindow200ResponseSchedule + return ret + } + + return o.Schedule +} + +// GetScheduleOk returns a tuple with the Schedule field value +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindow200Response) GetScheduleOk() (*CreateMaintenanceWindow200ResponseSchedule, bool) { + if o == nil { + return nil, false + } + return &o.Schedule, true +} + +// SetSchedule sets field value +func (o *CreateMaintenanceWindow200Response) SetSchedule(v CreateMaintenanceWindow200ResponseSchedule) { + o.Schedule = v +} + +// GetScope returns the Scope field value if set, zero value otherwise. +func (o *CreateMaintenanceWindow200Response) GetScope() CreateMaintenanceWindowRequestScope { + if o == nil || IsNil(o.Scope) { + var ret CreateMaintenanceWindowRequestScope + return ret + } + return *o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindow200Response) GetScopeOk() (*CreateMaintenanceWindowRequestScope, bool) { + if o == nil || IsNil(o.Scope) { + return nil, false + } + return o.Scope, true +} + +// HasScope returns a boolean if a field has been set. +func (o *CreateMaintenanceWindow200Response) HasScope() bool { + if o != nil && !IsNil(o.Scope) { + return true + } + + return false +} + +// SetScope gets a reference to the given CreateMaintenanceWindowRequestScope and assigns it to the Scope field. +func (o *CreateMaintenanceWindow200Response) SetScope(v CreateMaintenanceWindowRequestScope) { + o.Scope = &v +} + +// GetStatus returns the Status field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *CreateMaintenanceWindow200Response) GetStatus() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200Response) GetStatusOk() (*interface{}, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *CreateMaintenanceWindow200Response) SetStatus(v interface{}) { + o.Status = v +} + +// GetTitle returns the Title field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *CreateMaintenanceWindow200Response) GetTitle() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200Response) GetTitleOk() (*interface{}, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *CreateMaintenanceWindow200Response) SetTitle(v interface{}) { + o.Title = v +} + +// GetUpdatedAt returns the UpdatedAt field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *CreateMaintenanceWindow200Response) GetUpdatedAt() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200Response) GetUpdatedAtOk() (*interface{}, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *CreateMaintenanceWindow200Response) SetUpdatedAt(v interface{}) { + o.UpdatedAt = v +} + +// GetUpdatedBy returns the UpdatedBy field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *CreateMaintenanceWindow200Response) GetUpdatedBy() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.UpdatedBy +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200Response) GetUpdatedByOk() (*interface{}, bool) { + if o == nil || IsNil(o.UpdatedBy) { + return nil, false + } + return &o.UpdatedBy, true +} + +// SetUpdatedBy sets field value +func (o *CreateMaintenanceWindow200Response) SetUpdatedBy(v interface{}) { + o.UpdatedBy = v +} + +func (o CreateMaintenanceWindow200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateMaintenanceWindow200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.CreatedAt != nil { + toSerialize["created_at"] = o.CreatedAt + } + if o.CreatedBy != nil { + toSerialize["created_by"] = o.CreatedBy + } + if o.Enabled != nil { + toSerialize["enabled"] = o.Enabled + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + toSerialize["schedule"] = o.Schedule + if !IsNil(o.Scope) { + toSerialize["scope"] = o.Scope + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Title != nil { + toSerialize["title"] = o.Title + } + if o.UpdatedAt != nil { + toSerialize["updated_at"] = o.UpdatedAt + } + if o.UpdatedBy != nil { + toSerialize["updated_by"] = o.UpdatedBy + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateMaintenanceWindow200Response) UnmarshalJSON(bytes []byte) (err error) { + varCreateMaintenanceWindow200Response := _CreateMaintenanceWindow200Response{} + + err = json.Unmarshal(bytes, &varCreateMaintenanceWindow200Response) + + if err != nil { + return err + } + + *o = CreateMaintenanceWindow200Response(varCreateMaintenanceWindow200Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "created_at") + delete(additionalProperties, "created_by") + delete(additionalProperties, "enabled") + delete(additionalProperties, "id") + delete(additionalProperties, "schedule") + delete(additionalProperties, "scope") + delete(additionalProperties, "status") + delete(additionalProperties, "title") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "updated_by") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateMaintenanceWindow200Response struct { + value *CreateMaintenanceWindow200Response + isSet bool +} + +func (v NullableCreateMaintenanceWindow200Response) Get() *CreateMaintenanceWindow200Response { + return v.value +} + +func (v *NullableCreateMaintenanceWindow200Response) Set(val *CreateMaintenanceWindow200Response) { + v.value = val + v.isSet = true +} + +func (v NullableCreateMaintenanceWindow200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateMaintenanceWindow200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateMaintenanceWindow200Response(val *CreateMaintenanceWindow200Response) *NullableCreateMaintenanceWindow200Response { + return &NullableCreateMaintenanceWindow200Response{value: val, isSet: true} +} + +func (v NullableCreateMaintenanceWindow200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateMaintenanceWindow200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_create_maintenance_window_200_response_schedule.go b/generated/alerting/model_create_maintenance_window_200_response_schedule.go new file mode 100644 index 000000000..feeab740e --- /dev/null +++ b/generated/alerting/model_create_maintenance_window_200_response_schedule.go @@ -0,0 +1,144 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the CreateMaintenanceWindow200ResponseSchedule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateMaintenanceWindow200ResponseSchedule{} + +// CreateMaintenanceWindow200ResponseSchedule struct for CreateMaintenanceWindow200ResponseSchedule +type CreateMaintenanceWindow200ResponseSchedule struct { + Custom CreateMaintenanceWindow200ResponseScheduleCustom `json:"custom"` + AdditionalProperties map[string]interface{} +} + +type _CreateMaintenanceWindow200ResponseSchedule CreateMaintenanceWindow200ResponseSchedule + +// NewCreateMaintenanceWindow200ResponseSchedule instantiates a new CreateMaintenanceWindow200ResponseSchedule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateMaintenanceWindow200ResponseSchedule(custom CreateMaintenanceWindow200ResponseScheduleCustom) *CreateMaintenanceWindow200ResponseSchedule { + this := CreateMaintenanceWindow200ResponseSchedule{} + this.Custom = custom + return &this +} + +// NewCreateMaintenanceWindow200ResponseScheduleWithDefaults instantiates a new CreateMaintenanceWindow200ResponseSchedule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateMaintenanceWindow200ResponseScheduleWithDefaults() *CreateMaintenanceWindow200ResponseSchedule { + this := CreateMaintenanceWindow200ResponseSchedule{} + return &this +} + +// GetCustom returns the Custom field value +func (o *CreateMaintenanceWindow200ResponseSchedule) GetCustom() CreateMaintenanceWindow200ResponseScheduleCustom { + if o == nil { + var ret CreateMaintenanceWindow200ResponseScheduleCustom + return ret + } + + return o.Custom +} + +// GetCustomOk returns a tuple with the Custom field value +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindow200ResponseSchedule) GetCustomOk() (*CreateMaintenanceWindow200ResponseScheduleCustom, bool) { + if o == nil { + return nil, false + } + return &o.Custom, true +} + +// SetCustom sets field value +func (o *CreateMaintenanceWindow200ResponseSchedule) SetCustom(v CreateMaintenanceWindow200ResponseScheduleCustom) { + o.Custom = v +} + +func (o CreateMaintenanceWindow200ResponseSchedule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateMaintenanceWindow200ResponseSchedule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["custom"] = o.Custom + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateMaintenanceWindow200ResponseSchedule) UnmarshalJSON(bytes []byte) (err error) { + varCreateMaintenanceWindow200ResponseSchedule := _CreateMaintenanceWindow200ResponseSchedule{} + + err = json.Unmarshal(bytes, &varCreateMaintenanceWindow200ResponseSchedule) + + if err != nil { + return err + } + + *o = CreateMaintenanceWindow200ResponseSchedule(varCreateMaintenanceWindow200ResponseSchedule) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "custom") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateMaintenanceWindow200ResponseSchedule struct { + value *CreateMaintenanceWindow200ResponseSchedule + isSet bool +} + +func (v NullableCreateMaintenanceWindow200ResponseSchedule) Get() *CreateMaintenanceWindow200ResponseSchedule { + return v.value +} + +func (v *NullableCreateMaintenanceWindow200ResponseSchedule) Set(val *CreateMaintenanceWindow200ResponseSchedule) { + v.value = val + v.isSet = true +} + +func (v NullableCreateMaintenanceWindow200ResponseSchedule) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateMaintenanceWindow200ResponseSchedule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateMaintenanceWindow200ResponseSchedule(val *CreateMaintenanceWindow200ResponseSchedule) *NullableCreateMaintenanceWindow200ResponseSchedule { + return &NullableCreateMaintenanceWindow200ResponseSchedule{value: val, isSet: true} +} + +func (v NullableCreateMaintenanceWindow200ResponseSchedule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateMaintenanceWindow200ResponseSchedule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_create_maintenance_window_200_response_schedule_custom.go b/generated/alerting/model_create_maintenance_window_200_response_schedule_custom.go new file mode 100644 index 000000000..5bf092225 --- /dev/null +++ b/generated/alerting/model_create_maintenance_window_200_response_schedule_custom.go @@ -0,0 +1,258 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the CreateMaintenanceWindow200ResponseScheduleCustom type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateMaintenanceWindow200ResponseScheduleCustom{} + +// CreateMaintenanceWindow200ResponseScheduleCustom struct for CreateMaintenanceWindow200ResponseScheduleCustom +type CreateMaintenanceWindow200ResponseScheduleCustom struct { + // The duration of the schedule. It allows values in `` format. `` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`. + Duration interface{} `json:"duration"` + Recurring *CreateMaintenanceWindow200ResponseScheduleCustomRecurring `json:"recurring,omitempty"` + // The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`. + Start interface{} `json:"start"` + // The timezone of the schedule. The default timezone is UTC. + Timezone interface{} `json:"timezone,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateMaintenanceWindow200ResponseScheduleCustom CreateMaintenanceWindow200ResponseScheduleCustom + +// NewCreateMaintenanceWindow200ResponseScheduleCustom instantiates a new CreateMaintenanceWindow200ResponseScheduleCustom object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateMaintenanceWindow200ResponseScheduleCustom(duration interface{}, start interface{}) *CreateMaintenanceWindow200ResponseScheduleCustom { + this := CreateMaintenanceWindow200ResponseScheduleCustom{} + this.Duration = duration + this.Start = start + return &this +} + +// NewCreateMaintenanceWindow200ResponseScheduleCustomWithDefaults instantiates a new CreateMaintenanceWindow200ResponseScheduleCustom object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateMaintenanceWindow200ResponseScheduleCustomWithDefaults() *CreateMaintenanceWindow200ResponseScheduleCustom { + this := CreateMaintenanceWindow200ResponseScheduleCustom{} + return &this +} + +// GetDuration returns the Duration field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *CreateMaintenanceWindow200ResponseScheduleCustom) GetDuration() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Duration +} + +// GetDurationOk returns a tuple with the Duration field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200ResponseScheduleCustom) GetDurationOk() (*interface{}, bool) { + if o == nil || IsNil(o.Duration) { + return nil, false + } + return &o.Duration, true +} + +// SetDuration sets field value +func (o *CreateMaintenanceWindow200ResponseScheduleCustom) SetDuration(v interface{}) { + o.Duration = v +} + +// GetRecurring returns the Recurring field value if set, zero value otherwise. +func (o *CreateMaintenanceWindow200ResponseScheduleCustom) GetRecurring() CreateMaintenanceWindow200ResponseScheduleCustomRecurring { + if o == nil || IsNil(o.Recurring) { + var ret CreateMaintenanceWindow200ResponseScheduleCustomRecurring + return ret + } + return *o.Recurring +} + +// GetRecurringOk returns a tuple with the Recurring field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindow200ResponseScheduleCustom) GetRecurringOk() (*CreateMaintenanceWindow200ResponseScheduleCustomRecurring, bool) { + if o == nil || IsNil(o.Recurring) { + return nil, false + } + return o.Recurring, true +} + +// HasRecurring returns a boolean if a field has been set. +func (o *CreateMaintenanceWindow200ResponseScheduleCustom) HasRecurring() bool { + if o != nil && !IsNil(o.Recurring) { + return true + } + + return false +} + +// SetRecurring gets a reference to the given CreateMaintenanceWindow200ResponseScheduleCustomRecurring and assigns it to the Recurring field. +func (o *CreateMaintenanceWindow200ResponseScheduleCustom) SetRecurring(v CreateMaintenanceWindow200ResponseScheduleCustomRecurring) { + o.Recurring = &v +} + +// GetStart returns the Start field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *CreateMaintenanceWindow200ResponseScheduleCustom) GetStart() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Start +} + +// GetStartOk returns a tuple with the Start field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200ResponseScheduleCustom) GetStartOk() (*interface{}, bool) { + if o == nil || IsNil(o.Start) { + return nil, false + } + return &o.Start, true +} + +// SetStart sets field value +func (o *CreateMaintenanceWindow200ResponseScheduleCustom) SetStart(v interface{}) { + o.Start = v +} + +// GetTimezone returns the Timezone field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateMaintenanceWindow200ResponseScheduleCustom) GetTimezone() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Timezone +} + +// GetTimezoneOk returns a tuple with the Timezone field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200ResponseScheduleCustom) GetTimezoneOk() (*interface{}, bool) { + if o == nil || IsNil(o.Timezone) { + return nil, false + } + return &o.Timezone, true +} + +// HasTimezone returns a boolean if a field has been set. +func (o *CreateMaintenanceWindow200ResponseScheduleCustom) HasTimezone() bool { + if o != nil && IsNil(o.Timezone) { + return true + } + + return false +} + +// SetTimezone gets a reference to the given interface{} and assigns it to the Timezone field. +func (o *CreateMaintenanceWindow200ResponseScheduleCustom) SetTimezone(v interface{}) { + o.Timezone = v +} + +func (o CreateMaintenanceWindow200ResponseScheduleCustom) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateMaintenanceWindow200ResponseScheduleCustom) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Duration != nil { + toSerialize["duration"] = o.Duration + } + if !IsNil(o.Recurring) { + toSerialize["recurring"] = o.Recurring + } + if o.Start != nil { + toSerialize["start"] = o.Start + } + if o.Timezone != nil { + toSerialize["timezone"] = o.Timezone + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateMaintenanceWindow200ResponseScheduleCustom) UnmarshalJSON(bytes []byte) (err error) { + varCreateMaintenanceWindow200ResponseScheduleCustom := _CreateMaintenanceWindow200ResponseScheduleCustom{} + + err = json.Unmarshal(bytes, &varCreateMaintenanceWindow200ResponseScheduleCustom) + + if err != nil { + return err + } + + *o = CreateMaintenanceWindow200ResponseScheduleCustom(varCreateMaintenanceWindow200ResponseScheduleCustom) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "duration") + delete(additionalProperties, "recurring") + delete(additionalProperties, "start") + delete(additionalProperties, "timezone") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateMaintenanceWindow200ResponseScheduleCustom struct { + value *CreateMaintenanceWindow200ResponseScheduleCustom + isSet bool +} + +func (v NullableCreateMaintenanceWindow200ResponseScheduleCustom) Get() *CreateMaintenanceWindow200ResponseScheduleCustom { + return v.value +} + +func (v *NullableCreateMaintenanceWindow200ResponseScheduleCustom) Set(val *CreateMaintenanceWindow200ResponseScheduleCustom) { + v.value = val + v.isSet = true +} + +func (v NullableCreateMaintenanceWindow200ResponseScheduleCustom) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateMaintenanceWindow200ResponseScheduleCustom) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateMaintenanceWindow200ResponseScheduleCustom(val *CreateMaintenanceWindow200ResponseScheduleCustom) *NullableCreateMaintenanceWindow200ResponseScheduleCustom { + return &NullableCreateMaintenanceWindow200ResponseScheduleCustom{value: val, isSet: true} +} + +func (v NullableCreateMaintenanceWindow200ResponseScheduleCustom) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateMaintenanceWindow200ResponseScheduleCustom) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_create_maintenance_window_200_response_schedule_custom_recurring.go b/generated/alerting/model_create_maintenance_window_200_response_schedule_custom_recurring.go new file mode 100644 index 000000000..01db81c60 --- /dev/null +++ b/generated/alerting/model_create_maintenance_window_200_response_schedule_custom_recurring.go @@ -0,0 +1,350 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the CreateMaintenanceWindow200ResponseScheduleCustomRecurring type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateMaintenanceWindow200ResponseScheduleCustomRecurring{} + +// CreateMaintenanceWindow200ResponseScheduleCustomRecurring struct for CreateMaintenanceWindow200ResponseScheduleCustomRecurring +type CreateMaintenanceWindow200ResponseScheduleCustomRecurring struct { + // The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`. + End interface{} `json:"end,omitempty"` + // The interval and frequency of a recurring schedule. It allows values in `` format. `` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`. + Every interface{} `json:"every,omitempty"` + // The total number of recurrences of the schedule. + Occurrences interface{} `json:"occurrences,omitempty"` + // The specific months for a recurring schedule. Valid values are 1-12. + OnMonth interface{} `json:"onMonth,omitempty"` + // The specific days of the month for a recurring schedule. Valid values are 1-31. + OnMonthDay interface{} `json:"onMonthDay,omitempty"` + // The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule. + OnWeekDay interface{} `json:"onWeekDay,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateMaintenanceWindow200ResponseScheduleCustomRecurring CreateMaintenanceWindow200ResponseScheduleCustomRecurring + +// NewCreateMaintenanceWindow200ResponseScheduleCustomRecurring instantiates a new CreateMaintenanceWindow200ResponseScheduleCustomRecurring object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateMaintenanceWindow200ResponseScheduleCustomRecurring() *CreateMaintenanceWindow200ResponseScheduleCustomRecurring { + this := CreateMaintenanceWindow200ResponseScheduleCustomRecurring{} + return &this +} + +// NewCreateMaintenanceWindow200ResponseScheduleCustomRecurringWithDefaults instantiates a new CreateMaintenanceWindow200ResponseScheduleCustomRecurring object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateMaintenanceWindow200ResponseScheduleCustomRecurringWithDefaults() *CreateMaintenanceWindow200ResponseScheduleCustomRecurring { + this := CreateMaintenanceWindow200ResponseScheduleCustomRecurring{} + return &this +} + +// GetEnd returns the End field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetEnd() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.End +} + +// GetEndOk returns a tuple with the End field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetEndOk() (*interface{}, bool) { + if o == nil || IsNil(o.End) { + return nil, false + } + return &o.End, true +} + +// HasEnd returns a boolean if a field has been set. +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) HasEnd() bool { + if o != nil && IsNil(o.End) { + return true + } + + return false +} + +// SetEnd gets a reference to the given interface{} and assigns it to the End field. +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetEnd(v interface{}) { + o.End = v +} + +// GetEvery returns the Every field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetEvery() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Every +} + +// GetEveryOk returns a tuple with the Every field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetEveryOk() (*interface{}, bool) { + if o == nil || IsNil(o.Every) { + return nil, false + } + return &o.Every, true +} + +// HasEvery returns a boolean if a field has been set. +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) HasEvery() bool { + if o != nil && IsNil(o.Every) { + return true + } + + return false +} + +// SetEvery gets a reference to the given interface{} and assigns it to the Every field. +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetEvery(v interface{}) { + o.Every = v +} + +// GetOccurrences returns the Occurrences field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetOccurrences() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Occurrences +} + +// GetOccurrencesOk returns a tuple with the Occurrences field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetOccurrencesOk() (*interface{}, bool) { + if o == nil || IsNil(o.Occurrences) { + return nil, false + } + return &o.Occurrences, true +} + +// HasOccurrences returns a boolean if a field has been set. +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) HasOccurrences() bool { + if o != nil && IsNil(o.Occurrences) { + return true + } + + return false +} + +// SetOccurrences gets a reference to the given interface{} and assigns it to the Occurrences field. +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetOccurrences(v interface{}) { + o.Occurrences = v +} + +// GetOnMonth returns the OnMonth field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnMonth() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.OnMonth +} + +// GetOnMonthOk returns a tuple with the OnMonth field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnMonthOk() (*interface{}, bool) { + if o == nil || IsNil(o.OnMonth) { + return nil, false + } + return &o.OnMonth, true +} + +// HasOnMonth returns a boolean if a field has been set. +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) HasOnMonth() bool { + if o != nil && IsNil(o.OnMonth) { + return true + } + + return false +} + +// SetOnMonth gets a reference to the given interface{} and assigns it to the OnMonth field. +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnMonth(v interface{}) { + o.OnMonth = v +} + +// GetOnMonthDay returns the OnMonthDay field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnMonthDay() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.OnMonthDay +} + +// GetOnMonthDayOk returns a tuple with the OnMonthDay field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnMonthDayOk() (*interface{}, bool) { + if o == nil || IsNil(o.OnMonthDay) { + return nil, false + } + return &o.OnMonthDay, true +} + +// HasOnMonthDay returns a boolean if a field has been set. +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) HasOnMonthDay() bool { + if o != nil && IsNil(o.OnMonthDay) { + return true + } + + return false +} + +// SetOnMonthDay gets a reference to the given interface{} and assigns it to the OnMonthDay field. +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnMonthDay(v interface{}) { + o.OnMonthDay = v +} + +// GetOnWeekDay returns the OnWeekDay field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnWeekDay() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.OnWeekDay +} + +// GetOnWeekDayOk returns a tuple with the OnWeekDay field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnWeekDayOk() (*interface{}, bool) { + if o == nil || IsNil(o.OnWeekDay) { + return nil, false + } + return &o.OnWeekDay, true +} + +// HasOnWeekDay returns a boolean if a field has been set. +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) HasOnWeekDay() bool { + if o != nil && IsNil(o.OnWeekDay) { + return true + } + + return false +} + +// SetOnWeekDay gets a reference to the given interface{} and assigns it to the OnWeekDay field. +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnWeekDay(v interface{}) { + o.OnWeekDay = v +} + +func (o CreateMaintenanceWindow200ResponseScheduleCustomRecurring) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateMaintenanceWindow200ResponseScheduleCustomRecurring) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.End != nil { + toSerialize["end"] = o.End + } + if o.Every != nil { + toSerialize["every"] = o.Every + } + if o.Occurrences != nil { + toSerialize["occurrences"] = o.Occurrences + } + if o.OnMonth != nil { + toSerialize["onMonth"] = o.OnMonth + } + if o.OnMonthDay != nil { + toSerialize["onMonthDay"] = o.OnMonthDay + } + if o.OnWeekDay != nil { + toSerialize["onWeekDay"] = o.OnWeekDay + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) UnmarshalJSON(bytes []byte) (err error) { + varCreateMaintenanceWindow200ResponseScheduleCustomRecurring := _CreateMaintenanceWindow200ResponseScheduleCustomRecurring{} + + err = json.Unmarshal(bytes, &varCreateMaintenanceWindow200ResponseScheduleCustomRecurring) + + if err != nil { + return err + } + + *o = CreateMaintenanceWindow200ResponseScheduleCustomRecurring(varCreateMaintenanceWindow200ResponseScheduleCustomRecurring) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "end") + delete(additionalProperties, "every") + delete(additionalProperties, "occurrences") + delete(additionalProperties, "onMonth") + delete(additionalProperties, "onMonthDay") + delete(additionalProperties, "onWeekDay") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateMaintenanceWindow200ResponseScheduleCustomRecurring struct { + value *CreateMaintenanceWindow200ResponseScheduleCustomRecurring + isSet bool +} + +func (v NullableCreateMaintenanceWindow200ResponseScheduleCustomRecurring) Get() *CreateMaintenanceWindow200ResponseScheduleCustomRecurring { + return v.value +} + +func (v *NullableCreateMaintenanceWindow200ResponseScheduleCustomRecurring) Set(val *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) { + v.value = val + v.isSet = true +} + +func (v NullableCreateMaintenanceWindow200ResponseScheduleCustomRecurring) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateMaintenanceWindow200ResponseScheduleCustomRecurring) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateMaintenanceWindow200ResponseScheduleCustomRecurring(val *CreateMaintenanceWindow200ResponseScheduleCustomRecurring) *NullableCreateMaintenanceWindow200ResponseScheduleCustomRecurring { + return &NullableCreateMaintenanceWindow200ResponseScheduleCustomRecurring{value: val, isSet: true} +} + +func (v NullableCreateMaintenanceWindow200ResponseScheduleCustomRecurring) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateMaintenanceWindow200ResponseScheduleCustomRecurring) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_create_maintenance_window_request.go b/generated/alerting/model_create_maintenance_window_request.go new file mode 100644 index 000000000..1d1923829 --- /dev/null +++ b/generated/alerting/model_create_maintenance_window_request.go @@ -0,0 +1,216 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the CreateMaintenanceWindowRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateMaintenanceWindowRequest{} + +// CreateMaintenanceWindowRequest struct for CreateMaintenanceWindowRequest +type CreateMaintenanceWindowRequest struct { + // Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. + Enabled *bool `json:"enabled,omitempty"` + Schedule CreateMaintenanceWindowRequestSchedule `json:"schedule"` + Scope *CreateMaintenanceWindowRequestScope `json:"scope,omitempty"` + // The name of the maintenance window. While this name does not have to be unique, a distinctive name can help you identify a specific maintenance window. + Title string `json:"title"` +} + +// NewCreateMaintenanceWindowRequest instantiates a new CreateMaintenanceWindowRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateMaintenanceWindowRequest(schedule CreateMaintenanceWindowRequestSchedule, title string) *CreateMaintenanceWindowRequest { + this := CreateMaintenanceWindowRequest{} + this.Schedule = schedule + this.Title = title + return &this +} + +// NewCreateMaintenanceWindowRequestWithDefaults instantiates a new CreateMaintenanceWindowRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateMaintenanceWindowRequestWithDefaults() *CreateMaintenanceWindowRequest { + this := CreateMaintenanceWindowRequest{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *CreateMaintenanceWindowRequest) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequest) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *CreateMaintenanceWindowRequest) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *CreateMaintenanceWindowRequest) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetSchedule returns the Schedule field value +func (o *CreateMaintenanceWindowRequest) GetSchedule() CreateMaintenanceWindowRequestSchedule { + if o == nil { + var ret CreateMaintenanceWindowRequestSchedule + return ret + } + + return o.Schedule +} + +// GetScheduleOk returns a tuple with the Schedule field value +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequest) GetScheduleOk() (*CreateMaintenanceWindowRequestSchedule, bool) { + if o == nil { + return nil, false + } + return &o.Schedule, true +} + +// SetSchedule sets field value +func (o *CreateMaintenanceWindowRequest) SetSchedule(v CreateMaintenanceWindowRequestSchedule) { + o.Schedule = v +} + +// GetScope returns the Scope field value if set, zero value otherwise. +func (o *CreateMaintenanceWindowRequest) GetScope() CreateMaintenanceWindowRequestScope { + if o == nil || IsNil(o.Scope) { + var ret CreateMaintenanceWindowRequestScope + return ret + } + return *o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequest) GetScopeOk() (*CreateMaintenanceWindowRequestScope, bool) { + if o == nil || IsNil(o.Scope) { + return nil, false + } + return o.Scope, true +} + +// HasScope returns a boolean if a field has been set. +func (o *CreateMaintenanceWindowRequest) HasScope() bool { + if o != nil && !IsNil(o.Scope) { + return true + } + + return false +} + +// SetScope gets a reference to the given CreateMaintenanceWindowRequestScope and assigns it to the Scope field. +func (o *CreateMaintenanceWindowRequest) SetScope(v CreateMaintenanceWindowRequestScope) { + o.Scope = &v +} + +// GetTitle returns the Title field value +func (o *CreateMaintenanceWindowRequest) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequest) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *CreateMaintenanceWindowRequest) SetTitle(v string) { + o.Title = v +} + +func (o CreateMaintenanceWindowRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateMaintenanceWindowRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + toSerialize["schedule"] = o.Schedule + if !IsNil(o.Scope) { + toSerialize["scope"] = o.Scope + } + toSerialize["title"] = o.Title + return toSerialize, nil +} + +type NullableCreateMaintenanceWindowRequest struct { + value *CreateMaintenanceWindowRequest + isSet bool +} + +func (v NullableCreateMaintenanceWindowRequest) Get() *CreateMaintenanceWindowRequest { + return v.value +} + +func (v *NullableCreateMaintenanceWindowRequest) Set(val *CreateMaintenanceWindowRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateMaintenanceWindowRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateMaintenanceWindowRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateMaintenanceWindowRequest(val *CreateMaintenanceWindowRequest) *NullableCreateMaintenanceWindowRequest { + return &NullableCreateMaintenanceWindowRequest{value: val, isSet: true} +} + +func (v NullableCreateMaintenanceWindowRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateMaintenanceWindowRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_create_maintenance_window_request_schedule.go b/generated/alerting/model_create_maintenance_window_request_schedule.go new file mode 100644 index 000000000..e3b7d6817 --- /dev/null +++ b/generated/alerting/model_create_maintenance_window_request_schedule.go @@ -0,0 +1,115 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the CreateMaintenanceWindowRequestSchedule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateMaintenanceWindowRequestSchedule{} + +// CreateMaintenanceWindowRequestSchedule struct for CreateMaintenanceWindowRequestSchedule +type CreateMaintenanceWindowRequestSchedule struct { + Custom CreateMaintenanceWindowRequestScheduleCustom `json:"custom"` +} + +// NewCreateMaintenanceWindowRequestSchedule instantiates a new CreateMaintenanceWindowRequestSchedule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateMaintenanceWindowRequestSchedule(custom CreateMaintenanceWindowRequestScheduleCustom) *CreateMaintenanceWindowRequestSchedule { + this := CreateMaintenanceWindowRequestSchedule{} + this.Custom = custom + return &this +} + +// NewCreateMaintenanceWindowRequestScheduleWithDefaults instantiates a new CreateMaintenanceWindowRequestSchedule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateMaintenanceWindowRequestScheduleWithDefaults() *CreateMaintenanceWindowRequestSchedule { + this := CreateMaintenanceWindowRequestSchedule{} + return &this +} + +// GetCustom returns the Custom field value +func (o *CreateMaintenanceWindowRequestSchedule) GetCustom() CreateMaintenanceWindowRequestScheduleCustom { + if o == nil { + var ret CreateMaintenanceWindowRequestScheduleCustom + return ret + } + + return o.Custom +} + +// GetCustomOk returns a tuple with the Custom field value +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequestSchedule) GetCustomOk() (*CreateMaintenanceWindowRequestScheduleCustom, bool) { + if o == nil { + return nil, false + } + return &o.Custom, true +} + +// SetCustom sets field value +func (o *CreateMaintenanceWindowRequestSchedule) SetCustom(v CreateMaintenanceWindowRequestScheduleCustom) { + o.Custom = v +} + +func (o CreateMaintenanceWindowRequestSchedule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateMaintenanceWindowRequestSchedule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["custom"] = o.Custom + return toSerialize, nil +} + +type NullableCreateMaintenanceWindowRequestSchedule struct { + value *CreateMaintenanceWindowRequestSchedule + isSet bool +} + +func (v NullableCreateMaintenanceWindowRequestSchedule) Get() *CreateMaintenanceWindowRequestSchedule { + return v.value +} + +func (v *NullableCreateMaintenanceWindowRequestSchedule) Set(val *CreateMaintenanceWindowRequestSchedule) { + v.value = val + v.isSet = true +} + +func (v NullableCreateMaintenanceWindowRequestSchedule) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateMaintenanceWindowRequestSchedule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateMaintenanceWindowRequestSchedule(val *CreateMaintenanceWindowRequestSchedule) *NullableCreateMaintenanceWindowRequestSchedule { + return &NullableCreateMaintenanceWindowRequestSchedule{value: val, isSet: true} +} + +func (v NullableCreateMaintenanceWindowRequestSchedule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateMaintenanceWindowRequestSchedule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_create_maintenance_window_request_schedule_custom.go b/generated/alerting/model_create_maintenance_window_request_schedule_custom.go new file mode 100644 index 000000000..e6d3dfbc5 --- /dev/null +++ b/generated/alerting/model_create_maintenance_window_request_schedule_custom.go @@ -0,0 +1,217 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the CreateMaintenanceWindowRequestScheduleCustom type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateMaintenanceWindowRequestScheduleCustom{} + +// CreateMaintenanceWindowRequestScheduleCustom struct for CreateMaintenanceWindowRequestScheduleCustom +type CreateMaintenanceWindowRequestScheduleCustom struct { + // The duration of the schedule. It allows values in `` format. `` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`. + Duration string `json:"duration"` + Recurring *CreateMaintenanceWindowRequestScheduleCustomRecurring `json:"recurring,omitempty"` + // The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`. + Start string `json:"start"` + // The timezone of the schedule. The default timezone is UTC. + Timezone *string `json:"timezone,omitempty"` +} + +// NewCreateMaintenanceWindowRequestScheduleCustom instantiates a new CreateMaintenanceWindowRequestScheduleCustom object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateMaintenanceWindowRequestScheduleCustom(duration string, start string) *CreateMaintenanceWindowRequestScheduleCustom { + this := CreateMaintenanceWindowRequestScheduleCustom{} + this.Duration = duration + this.Start = start + return &this +} + +// NewCreateMaintenanceWindowRequestScheduleCustomWithDefaults instantiates a new CreateMaintenanceWindowRequestScheduleCustom object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateMaintenanceWindowRequestScheduleCustomWithDefaults() *CreateMaintenanceWindowRequestScheduleCustom { + this := CreateMaintenanceWindowRequestScheduleCustom{} + return &this +} + +// GetDuration returns the Duration field value +func (o *CreateMaintenanceWindowRequestScheduleCustom) GetDuration() string { + if o == nil { + var ret string + return ret + } + + return o.Duration +} + +// GetDurationOk returns a tuple with the Duration field value +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustom) GetDurationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Duration, true +} + +// SetDuration sets field value +func (o *CreateMaintenanceWindowRequestScheduleCustom) SetDuration(v string) { + o.Duration = v +} + +// GetRecurring returns the Recurring field value if set, zero value otherwise. +func (o *CreateMaintenanceWindowRequestScheduleCustom) GetRecurring() CreateMaintenanceWindowRequestScheduleCustomRecurring { + if o == nil || IsNil(o.Recurring) { + var ret CreateMaintenanceWindowRequestScheduleCustomRecurring + return ret + } + return *o.Recurring +} + +// GetRecurringOk returns a tuple with the Recurring field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustom) GetRecurringOk() (*CreateMaintenanceWindowRequestScheduleCustomRecurring, bool) { + if o == nil || IsNil(o.Recurring) { + return nil, false + } + return o.Recurring, true +} + +// HasRecurring returns a boolean if a field has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustom) HasRecurring() bool { + if o != nil && !IsNil(o.Recurring) { + return true + } + + return false +} + +// SetRecurring gets a reference to the given CreateMaintenanceWindowRequestScheduleCustomRecurring and assigns it to the Recurring field. +func (o *CreateMaintenanceWindowRequestScheduleCustom) SetRecurring(v CreateMaintenanceWindowRequestScheduleCustomRecurring) { + o.Recurring = &v +} + +// GetStart returns the Start field value +func (o *CreateMaintenanceWindowRequestScheduleCustom) GetStart() string { + if o == nil { + var ret string + return ret + } + + return o.Start +} + +// GetStartOk returns a tuple with the Start field value +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustom) GetStartOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Start, true +} + +// SetStart sets field value +func (o *CreateMaintenanceWindowRequestScheduleCustom) SetStart(v string) { + o.Start = v +} + +// GetTimezone returns the Timezone field value if set, zero value otherwise. +func (o *CreateMaintenanceWindowRequestScheduleCustom) GetTimezone() string { + if o == nil || IsNil(o.Timezone) { + var ret string + return ret + } + return *o.Timezone +} + +// GetTimezoneOk returns a tuple with the Timezone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustom) GetTimezoneOk() (*string, bool) { + if o == nil || IsNil(o.Timezone) { + return nil, false + } + return o.Timezone, true +} + +// HasTimezone returns a boolean if a field has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustom) HasTimezone() bool { + if o != nil && !IsNil(o.Timezone) { + return true + } + + return false +} + +// SetTimezone gets a reference to the given string and assigns it to the Timezone field. +func (o *CreateMaintenanceWindowRequestScheduleCustom) SetTimezone(v string) { + o.Timezone = &v +} + +func (o CreateMaintenanceWindowRequestScheduleCustom) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateMaintenanceWindowRequestScheduleCustom) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["duration"] = o.Duration + if !IsNil(o.Recurring) { + toSerialize["recurring"] = o.Recurring + } + toSerialize["start"] = o.Start + if !IsNil(o.Timezone) { + toSerialize["timezone"] = o.Timezone + } + return toSerialize, nil +} + +type NullableCreateMaintenanceWindowRequestScheduleCustom struct { + value *CreateMaintenanceWindowRequestScheduleCustom + isSet bool +} + +func (v NullableCreateMaintenanceWindowRequestScheduleCustom) Get() *CreateMaintenanceWindowRequestScheduleCustom { + return v.value +} + +func (v *NullableCreateMaintenanceWindowRequestScheduleCustom) Set(val *CreateMaintenanceWindowRequestScheduleCustom) { + v.value = val + v.isSet = true +} + +func (v NullableCreateMaintenanceWindowRequestScheduleCustom) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateMaintenanceWindowRequestScheduleCustom) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateMaintenanceWindowRequestScheduleCustom(val *CreateMaintenanceWindowRequestScheduleCustom) *NullableCreateMaintenanceWindowRequestScheduleCustom { + return &NullableCreateMaintenanceWindowRequestScheduleCustom{value: val, isSet: true} +} + +func (v NullableCreateMaintenanceWindowRequestScheduleCustom) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateMaintenanceWindowRequestScheduleCustom) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_create_maintenance_window_request_schedule_custom_recurring.go b/generated/alerting/model_create_maintenance_window_request_schedule_custom_recurring.go new file mode 100644 index 000000000..fc0461955 --- /dev/null +++ b/generated/alerting/model_create_maintenance_window_request_schedule_custom_recurring.go @@ -0,0 +1,307 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the CreateMaintenanceWindowRequestScheduleCustomRecurring type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateMaintenanceWindowRequestScheduleCustomRecurring{} + +// CreateMaintenanceWindowRequestScheduleCustomRecurring struct for CreateMaintenanceWindowRequestScheduleCustomRecurring +type CreateMaintenanceWindowRequestScheduleCustomRecurring struct { + // The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`. + End *string `json:"end,omitempty"` + // The interval and frequency of a recurring schedule. It allows values in `` format. `` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`. + Every *string `json:"every,omitempty"` + // The total number of recurrences of the schedule. + Occurrences *float32 `json:"occurrences,omitempty"` + OnMonth []float32 `json:"onMonth,omitempty"` + OnMonthDay []float32 `json:"onMonthDay,omitempty"` + OnWeekDay []string `json:"onWeekDay,omitempty"` +} + +// NewCreateMaintenanceWindowRequestScheduleCustomRecurring instantiates a new CreateMaintenanceWindowRequestScheduleCustomRecurring object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateMaintenanceWindowRequestScheduleCustomRecurring() *CreateMaintenanceWindowRequestScheduleCustomRecurring { + this := CreateMaintenanceWindowRequestScheduleCustomRecurring{} + return &this +} + +// NewCreateMaintenanceWindowRequestScheduleCustomRecurringWithDefaults instantiates a new CreateMaintenanceWindowRequestScheduleCustomRecurring object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateMaintenanceWindowRequestScheduleCustomRecurringWithDefaults() *CreateMaintenanceWindowRequestScheduleCustomRecurring { + this := CreateMaintenanceWindowRequestScheduleCustomRecurring{} + return &this +} + +// GetEnd returns the End field value if set, zero value otherwise. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetEnd() string { + if o == nil || IsNil(o.End) { + var ret string + return ret + } + return *o.End +} + +// GetEndOk returns a tuple with the End field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetEndOk() (*string, bool) { + if o == nil || IsNil(o.End) { + return nil, false + } + return o.End, true +} + +// HasEnd returns a boolean if a field has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) HasEnd() bool { + if o != nil && !IsNil(o.End) { + return true + } + + return false +} + +// SetEnd gets a reference to the given string and assigns it to the End field. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) SetEnd(v string) { + o.End = &v +} + +// GetEvery returns the Every field value if set, zero value otherwise. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetEvery() string { + if o == nil || IsNil(o.Every) { + var ret string + return ret + } + return *o.Every +} + +// GetEveryOk returns a tuple with the Every field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetEveryOk() (*string, bool) { + if o == nil || IsNil(o.Every) { + return nil, false + } + return o.Every, true +} + +// HasEvery returns a boolean if a field has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) HasEvery() bool { + if o != nil && !IsNil(o.Every) { + return true + } + + return false +} + +// SetEvery gets a reference to the given string and assigns it to the Every field. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) SetEvery(v string) { + o.Every = &v +} + +// GetOccurrences returns the Occurrences field value if set, zero value otherwise. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetOccurrences() float32 { + if o == nil || IsNil(o.Occurrences) { + var ret float32 + return ret + } + return *o.Occurrences +} + +// GetOccurrencesOk returns a tuple with the Occurrences field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetOccurrencesOk() (*float32, bool) { + if o == nil || IsNil(o.Occurrences) { + return nil, false + } + return o.Occurrences, true +} + +// HasOccurrences returns a boolean if a field has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) HasOccurrences() bool { + if o != nil && !IsNil(o.Occurrences) { + return true + } + + return false +} + +// SetOccurrences gets a reference to the given float32 and assigns it to the Occurrences field. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) SetOccurrences(v float32) { + o.Occurrences = &v +} + +// GetOnMonth returns the OnMonth field value if set, zero value otherwise. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonth() []float32 { + if o == nil || IsNil(o.OnMonth) { + var ret []float32 + return ret + } + return o.OnMonth +} + +// GetOnMonthOk returns a tuple with the OnMonth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthOk() ([]float32, bool) { + if o == nil || IsNil(o.OnMonth) { + return nil, false + } + return o.OnMonth, true +} + +// HasOnMonth returns a boolean if a field has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) HasOnMonth() bool { + if o != nil && !IsNil(o.OnMonth) { + return true + } + + return false +} + +// SetOnMonth gets a reference to the given []float32 and assigns it to the OnMonth field. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) SetOnMonth(v []float32) { + o.OnMonth = v +} + +// GetOnMonthDay returns the OnMonthDay field value if set, zero value otherwise. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthDay() []float32 { + if o == nil || IsNil(o.OnMonthDay) { + var ret []float32 + return ret + } + return o.OnMonthDay +} + +// GetOnMonthDayOk returns a tuple with the OnMonthDay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthDayOk() ([]float32, bool) { + if o == nil || IsNil(o.OnMonthDay) { + return nil, false + } + return o.OnMonthDay, true +} + +// HasOnMonthDay returns a boolean if a field has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) HasOnMonthDay() bool { + if o != nil && !IsNil(o.OnMonthDay) { + return true + } + + return false +} + +// SetOnMonthDay gets a reference to the given []float32 and assigns it to the OnMonthDay field. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) SetOnMonthDay(v []float32) { + o.OnMonthDay = v +} + +// GetOnWeekDay returns the OnWeekDay field value if set, zero value otherwise. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetOnWeekDay() []string { + if o == nil || IsNil(o.OnWeekDay) { + var ret []string + return ret + } + return o.OnWeekDay +} + +// GetOnWeekDayOk returns a tuple with the OnWeekDay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) GetOnWeekDayOk() ([]string, bool) { + if o == nil || IsNil(o.OnWeekDay) { + return nil, false + } + return o.OnWeekDay, true +} + +// HasOnWeekDay returns a boolean if a field has been set. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) HasOnWeekDay() bool { + if o != nil && !IsNil(o.OnWeekDay) { + return true + } + + return false +} + +// SetOnWeekDay gets a reference to the given []string and assigns it to the OnWeekDay field. +func (o *CreateMaintenanceWindowRequestScheduleCustomRecurring) SetOnWeekDay(v []string) { + o.OnWeekDay = v +} + +func (o CreateMaintenanceWindowRequestScheduleCustomRecurring) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateMaintenanceWindowRequestScheduleCustomRecurring) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.End) { + toSerialize["end"] = o.End + } + if !IsNil(o.Every) { + toSerialize["every"] = o.Every + } + if !IsNil(o.Occurrences) { + toSerialize["occurrences"] = o.Occurrences + } + if !IsNil(o.OnMonth) { + toSerialize["onMonth"] = o.OnMonth + } + if !IsNil(o.OnMonthDay) { + toSerialize["onMonthDay"] = o.OnMonthDay + } + if !IsNil(o.OnWeekDay) { + toSerialize["onWeekDay"] = o.OnWeekDay + } + return toSerialize, nil +} + +type NullableCreateMaintenanceWindowRequestScheduleCustomRecurring struct { + value *CreateMaintenanceWindowRequestScheduleCustomRecurring + isSet bool +} + +func (v NullableCreateMaintenanceWindowRequestScheduleCustomRecurring) Get() *CreateMaintenanceWindowRequestScheduleCustomRecurring { + return v.value +} + +func (v *NullableCreateMaintenanceWindowRequestScheduleCustomRecurring) Set(val *CreateMaintenanceWindowRequestScheduleCustomRecurring) { + v.value = val + v.isSet = true +} + +func (v NullableCreateMaintenanceWindowRequestScheduleCustomRecurring) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateMaintenanceWindowRequestScheduleCustomRecurring) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateMaintenanceWindowRequestScheduleCustomRecurring(val *CreateMaintenanceWindowRequestScheduleCustomRecurring) *NullableCreateMaintenanceWindowRequestScheduleCustomRecurring { + return &NullableCreateMaintenanceWindowRequestScheduleCustomRecurring{value: val, isSet: true} +} + +func (v NullableCreateMaintenanceWindowRequestScheduleCustomRecurring) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateMaintenanceWindowRequestScheduleCustomRecurring) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_create_maintenance_window_request_scope.go b/generated/alerting/model_create_maintenance_window_request_scope.go new file mode 100644 index 000000000..5a39f0ca6 --- /dev/null +++ b/generated/alerting/model_create_maintenance_window_request_scope.go @@ -0,0 +1,115 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the CreateMaintenanceWindowRequestScope type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateMaintenanceWindowRequestScope{} + +// CreateMaintenanceWindowRequestScope struct for CreateMaintenanceWindowRequestScope +type CreateMaintenanceWindowRequestScope struct { + Alerting CreateMaintenanceWindowRequestScopeAlerting `json:"alerting"` +} + +// NewCreateMaintenanceWindowRequestScope instantiates a new CreateMaintenanceWindowRequestScope object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateMaintenanceWindowRequestScope(alerting CreateMaintenanceWindowRequestScopeAlerting) *CreateMaintenanceWindowRequestScope { + this := CreateMaintenanceWindowRequestScope{} + this.Alerting = alerting + return &this +} + +// NewCreateMaintenanceWindowRequestScopeWithDefaults instantiates a new CreateMaintenanceWindowRequestScope object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateMaintenanceWindowRequestScopeWithDefaults() *CreateMaintenanceWindowRequestScope { + this := CreateMaintenanceWindowRequestScope{} + return &this +} + +// GetAlerting returns the Alerting field value +func (o *CreateMaintenanceWindowRequestScope) GetAlerting() CreateMaintenanceWindowRequestScopeAlerting { + if o == nil { + var ret CreateMaintenanceWindowRequestScopeAlerting + return ret + } + + return o.Alerting +} + +// GetAlertingOk returns a tuple with the Alerting field value +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequestScope) GetAlertingOk() (*CreateMaintenanceWindowRequestScopeAlerting, bool) { + if o == nil { + return nil, false + } + return &o.Alerting, true +} + +// SetAlerting sets field value +func (o *CreateMaintenanceWindowRequestScope) SetAlerting(v CreateMaintenanceWindowRequestScopeAlerting) { + o.Alerting = v +} + +func (o CreateMaintenanceWindowRequestScope) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateMaintenanceWindowRequestScope) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["alerting"] = o.Alerting + return toSerialize, nil +} + +type NullableCreateMaintenanceWindowRequestScope struct { + value *CreateMaintenanceWindowRequestScope + isSet bool +} + +func (v NullableCreateMaintenanceWindowRequestScope) Get() *CreateMaintenanceWindowRequestScope { + return v.value +} + +func (v *NullableCreateMaintenanceWindowRequestScope) Set(val *CreateMaintenanceWindowRequestScope) { + v.value = val + v.isSet = true +} + +func (v NullableCreateMaintenanceWindowRequestScope) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateMaintenanceWindowRequestScope) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateMaintenanceWindowRequestScope(val *CreateMaintenanceWindowRequestScope) *NullableCreateMaintenanceWindowRequestScope { + return &NullableCreateMaintenanceWindowRequestScope{value: val, isSet: true} +} + +func (v NullableCreateMaintenanceWindowRequestScope) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateMaintenanceWindowRequestScope) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_create_maintenance_window_request_scope_alerting.go b/generated/alerting/model_create_maintenance_window_request_scope_alerting.go new file mode 100644 index 000000000..0e62ccb32 --- /dev/null +++ b/generated/alerting/model_create_maintenance_window_request_scope_alerting.go @@ -0,0 +1,115 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the CreateMaintenanceWindowRequestScopeAlerting type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateMaintenanceWindowRequestScopeAlerting{} + +// CreateMaintenanceWindowRequestScopeAlerting struct for CreateMaintenanceWindowRequestScopeAlerting +type CreateMaintenanceWindowRequestScopeAlerting struct { + Query CreateMaintenanceWindowRequestScopeAlertingQuery `json:"query"` +} + +// NewCreateMaintenanceWindowRequestScopeAlerting instantiates a new CreateMaintenanceWindowRequestScopeAlerting object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateMaintenanceWindowRequestScopeAlerting(query CreateMaintenanceWindowRequestScopeAlertingQuery) *CreateMaintenanceWindowRequestScopeAlerting { + this := CreateMaintenanceWindowRequestScopeAlerting{} + this.Query = query + return &this +} + +// NewCreateMaintenanceWindowRequestScopeAlertingWithDefaults instantiates a new CreateMaintenanceWindowRequestScopeAlerting object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateMaintenanceWindowRequestScopeAlertingWithDefaults() *CreateMaintenanceWindowRequestScopeAlerting { + this := CreateMaintenanceWindowRequestScopeAlerting{} + return &this +} + +// GetQuery returns the Query field value +func (o *CreateMaintenanceWindowRequestScopeAlerting) GetQuery() CreateMaintenanceWindowRequestScopeAlertingQuery { + if o == nil { + var ret CreateMaintenanceWindowRequestScopeAlertingQuery + return ret + } + + return o.Query +} + +// GetQueryOk returns a tuple with the Query field value +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequestScopeAlerting) GetQueryOk() (*CreateMaintenanceWindowRequestScopeAlertingQuery, bool) { + if o == nil { + return nil, false + } + return &o.Query, true +} + +// SetQuery sets field value +func (o *CreateMaintenanceWindowRequestScopeAlerting) SetQuery(v CreateMaintenanceWindowRequestScopeAlertingQuery) { + o.Query = v +} + +func (o CreateMaintenanceWindowRequestScopeAlerting) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateMaintenanceWindowRequestScopeAlerting) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["query"] = o.Query + return toSerialize, nil +} + +type NullableCreateMaintenanceWindowRequestScopeAlerting struct { + value *CreateMaintenanceWindowRequestScopeAlerting + isSet bool +} + +func (v NullableCreateMaintenanceWindowRequestScopeAlerting) Get() *CreateMaintenanceWindowRequestScopeAlerting { + return v.value +} + +func (v *NullableCreateMaintenanceWindowRequestScopeAlerting) Set(val *CreateMaintenanceWindowRequestScopeAlerting) { + v.value = val + v.isSet = true +} + +func (v NullableCreateMaintenanceWindowRequestScopeAlerting) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateMaintenanceWindowRequestScopeAlerting) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateMaintenanceWindowRequestScopeAlerting(val *CreateMaintenanceWindowRequestScopeAlerting) *NullableCreateMaintenanceWindowRequestScopeAlerting { + return &NullableCreateMaintenanceWindowRequestScopeAlerting{value: val, isSet: true} +} + +func (v NullableCreateMaintenanceWindowRequestScopeAlerting) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateMaintenanceWindowRequestScopeAlerting) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_create_maintenance_window_request_scope_alerting_query.go b/generated/alerting/model_create_maintenance_window_request_scope_alerting_query.go new file mode 100644 index 000000000..72250a88e --- /dev/null +++ b/generated/alerting/model_create_maintenance_window_request_scope_alerting_query.go @@ -0,0 +1,116 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the CreateMaintenanceWindowRequestScopeAlertingQuery type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateMaintenanceWindowRequestScopeAlertingQuery{} + +// CreateMaintenanceWindowRequestScopeAlertingQuery struct for CreateMaintenanceWindowRequestScopeAlertingQuery +type CreateMaintenanceWindowRequestScopeAlertingQuery struct { + // A filter written in Kibana Query Language (KQL). + Kql string `json:"kql"` +} + +// NewCreateMaintenanceWindowRequestScopeAlertingQuery instantiates a new CreateMaintenanceWindowRequestScopeAlertingQuery object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateMaintenanceWindowRequestScopeAlertingQuery(kql string) *CreateMaintenanceWindowRequestScopeAlertingQuery { + this := CreateMaintenanceWindowRequestScopeAlertingQuery{} + this.Kql = kql + return &this +} + +// NewCreateMaintenanceWindowRequestScopeAlertingQueryWithDefaults instantiates a new CreateMaintenanceWindowRequestScopeAlertingQuery object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateMaintenanceWindowRequestScopeAlertingQueryWithDefaults() *CreateMaintenanceWindowRequestScopeAlertingQuery { + this := CreateMaintenanceWindowRequestScopeAlertingQuery{} + return &this +} + +// GetKql returns the Kql field value +func (o *CreateMaintenanceWindowRequestScopeAlertingQuery) GetKql() string { + if o == nil { + var ret string + return ret + } + + return o.Kql +} + +// GetKqlOk returns a tuple with the Kql field value +// and a boolean to check if the value has been set. +func (o *CreateMaintenanceWindowRequestScopeAlertingQuery) GetKqlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kql, true +} + +// SetKql sets field value +func (o *CreateMaintenanceWindowRequestScopeAlertingQuery) SetKql(v string) { + o.Kql = v +} + +func (o CreateMaintenanceWindowRequestScopeAlertingQuery) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateMaintenanceWindowRequestScopeAlertingQuery) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["kql"] = o.Kql + return toSerialize, nil +} + +type NullableCreateMaintenanceWindowRequestScopeAlertingQuery struct { + value *CreateMaintenanceWindowRequestScopeAlertingQuery + isSet bool +} + +func (v NullableCreateMaintenanceWindowRequestScopeAlertingQuery) Get() *CreateMaintenanceWindowRequestScopeAlertingQuery { + return v.value +} + +func (v *NullableCreateMaintenanceWindowRequestScopeAlertingQuery) Set(val *CreateMaintenanceWindowRequestScopeAlertingQuery) { + v.value = val + v.isSet = true +} + +func (v NullableCreateMaintenanceWindowRequestScopeAlertingQuery) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateMaintenanceWindowRequestScopeAlertingQuery) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateMaintenanceWindowRequestScopeAlertingQuery(val *CreateMaintenanceWindowRequestScopeAlertingQuery) *NullableCreateMaintenanceWindowRequestScopeAlertingQuery { + return &NullableCreateMaintenanceWindowRequestScopeAlertingQuery{value: val, isSet: true} +} + +func (v NullableCreateMaintenanceWindowRequestScopeAlertingQuery) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateMaintenanceWindowRequestScopeAlertingQuery) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_maintenance_window_response_properties.go b/generated/alerting/model_maintenance_window_response_properties.go new file mode 100644 index 000000000..cb407aa32 --- /dev/null +++ b/generated/alerting/model_maintenance_window_response_properties.go @@ -0,0 +1,375 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the MaintenanceWindowResponseProperties type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MaintenanceWindowResponseProperties{} + +// MaintenanceWindowResponseProperties struct for MaintenanceWindowResponseProperties +type MaintenanceWindowResponseProperties struct { + // The date and time when the maintenance window was created. + CreatedAt string `json:"created_at"` + // The identifier for the user that created the maintenance window. + CreatedBy string `json:"created_by"` + // Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. + Enabled bool `json:"enabled"` + // The identifier for the maintenance window. + Id string `json:"id"` + Schedule MaintenanceWindowResponsePropertiesSchedule `json:"schedule"` + Scope *MaintenanceWindowResponsePropertiesScope `json:"scope,omitempty"` + // The current status of the maintenance window. + Status string `json:"status"` + // The name of the maintenance window. + Title string `json:"title"` + // The date and time when the maintenance window was last updated. + UpdatedAt string `json:"updated_at"` + // The identifier for the user that last updated this maintenance window. + UpdatedBy string `json:"updated_by"` +} + +// NewMaintenanceWindowResponseProperties instantiates a new MaintenanceWindowResponseProperties object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMaintenanceWindowResponseProperties(createdAt string, createdBy string, enabled bool, id string, schedule MaintenanceWindowResponsePropertiesSchedule, status string, title string, updatedAt string, updatedBy string) *MaintenanceWindowResponseProperties { + this := MaintenanceWindowResponseProperties{} + this.CreatedAt = createdAt + this.CreatedBy = createdBy + this.Enabled = enabled + this.Id = id + this.Schedule = schedule + this.Status = status + this.Title = title + this.UpdatedAt = updatedAt + this.UpdatedBy = updatedBy + return &this +} + +// NewMaintenanceWindowResponsePropertiesWithDefaults instantiates a new MaintenanceWindowResponseProperties object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMaintenanceWindowResponsePropertiesWithDefaults() *MaintenanceWindowResponseProperties { + this := MaintenanceWindowResponseProperties{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value +func (o *MaintenanceWindowResponseProperties) GetCreatedAt() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponseProperties) GetCreatedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *MaintenanceWindowResponseProperties) SetCreatedAt(v string) { + o.CreatedAt = v +} + +// GetCreatedBy returns the CreatedBy field value +func (o *MaintenanceWindowResponseProperties) GetCreatedBy() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedBy +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponseProperties) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedBy, true +} + +// SetCreatedBy sets field value +func (o *MaintenanceWindowResponseProperties) SetCreatedBy(v string) { + o.CreatedBy = v +} + +// GetEnabled returns the Enabled field value +func (o *MaintenanceWindowResponseProperties) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponseProperties) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *MaintenanceWindowResponseProperties) SetEnabled(v bool) { + o.Enabled = v +} + +// GetId returns the Id field value +func (o *MaintenanceWindowResponseProperties) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponseProperties) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *MaintenanceWindowResponseProperties) SetId(v string) { + o.Id = v +} + +// GetSchedule returns the Schedule field value +func (o *MaintenanceWindowResponseProperties) GetSchedule() MaintenanceWindowResponsePropertiesSchedule { + if o == nil { + var ret MaintenanceWindowResponsePropertiesSchedule + return ret + } + + return o.Schedule +} + +// GetScheduleOk returns a tuple with the Schedule field value +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponseProperties) GetScheduleOk() (*MaintenanceWindowResponsePropertiesSchedule, bool) { + if o == nil { + return nil, false + } + return &o.Schedule, true +} + +// SetSchedule sets field value +func (o *MaintenanceWindowResponseProperties) SetSchedule(v MaintenanceWindowResponsePropertiesSchedule) { + o.Schedule = v +} + +// GetScope returns the Scope field value if set, zero value otherwise. +func (o *MaintenanceWindowResponseProperties) GetScope() MaintenanceWindowResponsePropertiesScope { + if o == nil || IsNil(o.Scope) { + var ret MaintenanceWindowResponsePropertiesScope + return ret + } + return *o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponseProperties) GetScopeOk() (*MaintenanceWindowResponsePropertiesScope, bool) { + if o == nil || IsNil(o.Scope) { + return nil, false + } + return o.Scope, true +} + +// HasScope returns a boolean if a field has been set. +func (o *MaintenanceWindowResponseProperties) HasScope() bool { + if o != nil && !IsNil(o.Scope) { + return true + } + + return false +} + +// SetScope gets a reference to the given MaintenanceWindowResponsePropertiesScope and assigns it to the Scope field. +func (o *MaintenanceWindowResponseProperties) SetScope(v MaintenanceWindowResponsePropertiesScope) { + o.Scope = &v +} + +// GetStatus returns the Status field value +func (o *MaintenanceWindowResponseProperties) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponseProperties) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *MaintenanceWindowResponseProperties) SetStatus(v string) { + o.Status = v +} + +// GetTitle returns the Title field value +func (o *MaintenanceWindowResponseProperties) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponseProperties) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *MaintenanceWindowResponseProperties) SetTitle(v string) { + o.Title = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *MaintenanceWindowResponseProperties) GetUpdatedAt() string { + if o == nil { + var ret string + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponseProperties) GetUpdatedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *MaintenanceWindowResponseProperties) SetUpdatedAt(v string) { + o.UpdatedAt = v +} + +// GetUpdatedBy returns the UpdatedBy field value +func (o *MaintenanceWindowResponseProperties) GetUpdatedBy() string { + if o == nil { + var ret string + return ret + } + + return o.UpdatedBy +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponseProperties) GetUpdatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedBy, true +} + +// SetUpdatedBy sets field value +func (o *MaintenanceWindowResponseProperties) SetUpdatedBy(v string) { + o.UpdatedBy = v +} + +func (o MaintenanceWindowResponseProperties) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MaintenanceWindowResponseProperties) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["created_at"] = o.CreatedAt + toSerialize["created_by"] = o.CreatedBy + toSerialize["enabled"] = o.Enabled + toSerialize["id"] = o.Id + toSerialize["schedule"] = o.Schedule + if !IsNil(o.Scope) { + toSerialize["scope"] = o.Scope + } + toSerialize["status"] = o.Status + toSerialize["title"] = o.Title + toSerialize["updated_at"] = o.UpdatedAt + toSerialize["updated_by"] = o.UpdatedBy + return toSerialize, nil +} + +type NullableMaintenanceWindowResponseProperties struct { + value *MaintenanceWindowResponseProperties + isSet bool +} + +func (v NullableMaintenanceWindowResponseProperties) Get() *MaintenanceWindowResponseProperties { + return v.value +} + +func (v *NullableMaintenanceWindowResponseProperties) Set(val *MaintenanceWindowResponseProperties) { + v.value = val + v.isSet = true +} + +func (v NullableMaintenanceWindowResponseProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableMaintenanceWindowResponseProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMaintenanceWindowResponseProperties(val *MaintenanceWindowResponseProperties) *NullableMaintenanceWindowResponseProperties { + return &NullableMaintenanceWindowResponseProperties{value: val, isSet: true} +} + +func (v NullableMaintenanceWindowResponseProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMaintenanceWindowResponseProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_maintenance_window_response_properties_schedule.go b/generated/alerting/model_maintenance_window_response_properties_schedule.go new file mode 100644 index 000000000..67b994149 --- /dev/null +++ b/generated/alerting/model_maintenance_window_response_properties_schedule.go @@ -0,0 +1,144 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the MaintenanceWindowResponsePropertiesSchedule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MaintenanceWindowResponsePropertiesSchedule{} + +// MaintenanceWindowResponsePropertiesSchedule struct for MaintenanceWindowResponsePropertiesSchedule +type MaintenanceWindowResponsePropertiesSchedule struct { + Custom MaintenanceWindowResponsePropertiesScheduleCustom `json:"custom"` + AdditionalProperties map[string]interface{} +} + +type _MaintenanceWindowResponsePropertiesSchedule MaintenanceWindowResponsePropertiesSchedule + +// NewMaintenanceWindowResponsePropertiesSchedule instantiates a new MaintenanceWindowResponsePropertiesSchedule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMaintenanceWindowResponsePropertiesSchedule(custom MaintenanceWindowResponsePropertiesScheduleCustom) *MaintenanceWindowResponsePropertiesSchedule { + this := MaintenanceWindowResponsePropertiesSchedule{} + this.Custom = custom + return &this +} + +// NewMaintenanceWindowResponsePropertiesScheduleWithDefaults instantiates a new MaintenanceWindowResponsePropertiesSchedule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMaintenanceWindowResponsePropertiesScheduleWithDefaults() *MaintenanceWindowResponsePropertiesSchedule { + this := MaintenanceWindowResponsePropertiesSchedule{} + return &this +} + +// GetCustom returns the Custom field value +func (o *MaintenanceWindowResponsePropertiesSchedule) GetCustom() MaintenanceWindowResponsePropertiesScheduleCustom { + if o == nil { + var ret MaintenanceWindowResponsePropertiesScheduleCustom + return ret + } + + return o.Custom +} + +// GetCustomOk returns a tuple with the Custom field value +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponsePropertiesSchedule) GetCustomOk() (*MaintenanceWindowResponsePropertiesScheduleCustom, bool) { + if o == nil { + return nil, false + } + return &o.Custom, true +} + +// SetCustom sets field value +func (o *MaintenanceWindowResponsePropertiesSchedule) SetCustom(v MaintenanceWindowResponsePropertiesScheduleCustom) { + o.Custom = v +} + +func (o MaintenanceWindowResponsePropertiesSchedule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MaintenanceWindowResponsePropertiesSchedule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["custom"] = o.Custom + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MaintenanceWindowResponsePropertiesSchedule) UnmarshalJSON(bytes []byte) (err error) { + varMaintenanceWindowResponsePropertiesSchedule := _MaintenanceWindowResponsePropertiesSchedule{} + + err = json.Unmarshal(bytes, &varMaintenanceWindowResponsePropertiesSchedule) + + if err != nil { + return err + } + + *o = MaintenanceWindowResponsePropertiesSchedule(varMaintenanceWindowResponsePropertiesSchedule) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "custom") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMaintenanceWindowResponsePropertiesSchedule struct { + value *MaintenanceWindowResponsePropertiesSchedule + isSet bool +} + +func (v NullableMaintenanceWindowResponsePropertiesSchedule) Get() *MaintenanceWindowResponsePropertiesSchedule { + return v.value +} + +func (v *NullableMaintenanceWindowResponsePropertiesSchedule) Set(val *MaintenanceWindowResponsePropertiesSchedule) { + v.value = val + v.isSet = true +} + +func (v NullableMaintenanceWindowResponsePropertiesSchedule) IsSet() bool { + return v.isSet +} + +func (v *NullableMaintenanceWindowResponsePropertiesSchedule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMaintenanceWindowResponsePropertiesSchedule(val *MaintenanceWindowResponsePropertiesSchedule) *NullableMaintenanceWindowResponsePropertiesSchedule { + return &NullableMaintenanceWindowResponsePropertiesSchedule{value: val, isSet: true} +} + +func (v NullableMaintenanceWindowResponsePropertiesSchedule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMaintenanceWindowResponsePropertiesSchedule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_maintenance_window_response_properties_schedule_custom.go b/generated/alerting/model_maintenance_window_response_properties_schedule_custom.go new file mode 100644 index 000000000..86d7dd7a9 --- /dev/null +++ b/generated/alerting/model_maintenance_window_response_properties_schedule_custom.go @@ -0,0 +1,249 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the MaintenanceWindowResponsePropertiesScheduleCustom type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MaintenanceWindowResponsePropertiesScheduleCustom{} + +// MaintenanceWindowResponsePropertiesScheduleCustom struct for MaintenanceWindowResponsePropertiesScheduleCustom +type MaintenanceWindowResponsePropertiesScheduleCustom struct { + // The duration of the schedule. It allows values in `` format. `` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`. + Duration string `json:"duration"` + Recurring *MaintenanceWindowResponsePropertiesScheduleCustomRecurring `json:"recurring,omitempty"` + // The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`. + Start string `json:"start"` + // The timezone of the schedule. The default timezone is UTC. + Timezone *string `json:"timezone,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MaintenanceWindowResponsePropertiesScheduleCustom MaintenanceWindowResponsePropertiesScheduleCustom + +// NewMaintenanceWindowResponsePropertiesScheduleCustom instantiates a new MaintenanceWindowResponsePropertiesScheduleCustom object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMaintenanceWindowResponsePropertiesScheduleCustom(duration string, start string) *MaintenanceWindowResponsePropertiesScheduleCustom { + this := MaintenanceWindowResponsePropertiesScheduleCustom{} + this.Duration = duration + this.Start = start + return &this +} + +// NewMaintenanceWindowResponsePropertiesScheduleCustomWithDefaults instantiates a new MaintenanceWindowResponsePropertiesScheduleCustom object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMaintenanceWindowResponsePropertiesScheduleCustomWithDefaults() *MaintenanceWindowResponsePropertiesScheduleCustom { + this := MaintenanceWindowResponsePropertiesScheduleCustom{} + return &this +} + +// GetDuration returns the Duration field value +func (o *MaintenanceWindowResponsePropertiesScheduleCustom) GetDuration() string { + if o == nil { + var ret string + return ret + } + + return o.Duration +} + +// GetDurationOk returns a tuple with the Duration field value +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustom) GetDurationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Duration, true +} + +// SetDuration sets field value +func (o *MaintenanceWindowResponsePropertiesScheduleCustom) SetDuration(v string) { + o.Duration = v +} + +// GetRecurring returns the Recurring field value if set, zero value otherwise. +func (o *MaintenanceWindowResponsePropertiesScheduleCustom) GetRecurring() MaintenanceWindowResponsePropertiesScheduleCustomRecurring { + if o == nil || IsNil(o.Recurring) { + var ret MaintenanceWindowResponsePropertiesScheduleCustomRecurring + return ret + } + return *o.Recurring +} + +// GetRecurringOk returns a tuple with the Recurring field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustom) GetRecurringOk() (*MaintenanceWindowResponsePropertiesScheduleCustomRecurring, bool) { + if o == nil || IsNil(o.Recurring) { + return nil, false + } + return o.Recurring, true +} + +// HasRecurring returns a boolean if a field has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustom) HasRecurring() bool { + if o != nil && !IsNil(o.Recurring) { + return true + } + + return false +} + +// SetRecurring gets a reference to the given MaintenanceWindowResponsePropertiesScheduleCustomRecurring and assigns it to the Recurring field. +func (o *MaintenanceWindowResponsePropertiesScheduleCustom) SetRecurring(v MaintenanceWindowResponsePropertiesScheduleCustomRecurring) { + o.Recurring = &v +} + +// GetStart returns the Start field value +func (o *MaintenanceWindowResponsePropertiesScheduleCustom) GetStart() string { + if o == nil { + var ret string + return ret + } + + return o.Start +} + +// GetStartOk returns a tuple with the Start field value +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustom) GetStartOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Start, true +} + +// SetStart sets field value +func (o *MaintenanceWindowResponsePropertiesScheduleCustom) SetStart(v string) { + o.Start = v +} + +// GetTimezone returns the Timezone field value if set, zero value otherwise. +func (o *MaintenanceWindowResponsePropertiesScheduleCustom) GetTimezone() string { + if o == nil || IsNil(o.Timezone) { + var ret string + return ret + } + return *o.Timezone +} + +// GetTimezoneOk returns a tuple with the Timezone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustom) GetTimezoneOk() (*string, bool) { + if o == nil || IsNil(o.Timezone) { + return nil, false + } + return o.Timezone, true +} + +// HasTimezone returns a boolean if a field has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustom) HasTimezone() bool { + if o != nil && !IsNil(o.Timezone) { + return true + } + + return false +} + +// SetTimezone gets a reference to the given string and assigns it to the Timezone field. +func (o *MaintenanceWindowResponsePropertiesScheduleCustom) SetTimezone(v string) { + o.Timezone = &v +} + +func (o MaintenanceWindowResponsePropertiesScheduleCustom) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MaintenanceWindowResponsePropertiesScheduleCustom) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["duration"] = o.Duration + if !IsNil(o.Recurring) { + toSerialize["recurring"] = o.Recurring + } + toSerialize["start"] = o.Start + if !IsNil(o.Timezone) { + toSerialize["timezone"] = o.Timezone + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MaintenanceWindowResponsePropertiesScheduleCustom) UnmarshalJSON(bytes []byte) (err error) { + varMaintenanceWindowResponsePropertiesScheduleCustom := _MaintenanceWindowResponsePropertiesScheduleCustom{} + + err = json.Unmarshal(bytes, &varMaintenanceWindowResponsePropertiesScheduleCustom) + + if err != nil { + return err + } + + *o = MaintenanceWindowResponsePropertiesScheduleCustom(varMaintenanceWindowResponsePropertiesScheduleCustom) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "duration") + delete(additionalProperties, "recurring") + delete(additionalProperties, "start") + delete(additionalProperties, "timezone") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMaintenanceWindowResponsePropertiesScheduleCustom struct { + value *MaintenanceWindowResponsePropertiesScheduleCustom + isSet bool +} + +func (v NullableMaintenanceWindowResponsePropertiesScheduleCustom) Get() *MaintenanceWindowResponsePropertiesScheduleCustom { + return v.value +} + +func (v *NullableMaintenanceWindowResponsePropertiesScheduleCustom) Set(val *MaintenanceWindowResponsePropertiesScheduleCustom) { + v.value = val + v.isSet = true +} + +func (v NullableMaintenanceWindowResponsePropertiesScheduleCustom) IsSet() bool { + return v.isSet +} + +func (v *NullableMaintenanceWindowResponsePropertiesScheduleCustom) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMaintenanceWindowResponsePropertiesScheduleCustom(val *MaintenanceWindowResponsePropertiesScheduleCustom) *NullableMaintenanceWindowResponsePropertiesScheduleCustom { + return &NullableMaintenanceWindowResponsePropertiesScheduleCustom{value: val, isSet: true} +} + +func (v NullableMaintenanceWindowResponsePropertiesScheduleCustom) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMaintenanceWindowResponsePropertiesScheduleCustom) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_maintenance_window_response_properties_schedule_custom_recurring.go b/generated/alerting/model_maintenance_window_response_properties_schedule_custom_recurring.go new file mode 100644 index 000000000..b9893ce18 --- /dev/null +++ b/generated/alerting/model_maintenance_window_response_properties_schedule_custom_recurring.go @@ -0,0 +1,341 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the MaintenanceWindowResponsePropertiesScheduleCustomRecurring type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MaintenanceWindowResponsePropertiesScheduleCustomRecurring{} + +// MaintenanceWindowResponsePropertiesScheduleCustomRecurring struct for MaintenanceWindowResponsePropertiesScheduleCustomRecurring +type MaintenanceWindowResponsePropertiesScheduleCustomRecurring struct { + // The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`. + End *string `json:"end,omitempty"` + // The interval and frequency of a recurring schedule. It allows values in `` format. `` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`. + Every *string `json:"every,omitempty"` + // The total number of recurrences of the schedule. + Occurrences *float32 `json:"occurrences,omitempty"` + OnMonth []float32 `json:"onMonth,omitempty"` + OnMonthDay []float32 `json:"onMonthDay,omitempty"` + OnWeekDay []string `json:"onWeekDay,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MaintenanceWindowResponsePropertiesScheduleCustomRecurring MaintenanceWindowResponsePropertiesScheduleCustomRecurring + +// NewMaintenanceWindowResponsePropertiesScheduleCustomRecurring instantiates a new MaintenanceWindowResponsePropertiesScheduleCustomRecurring object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMaintenanceWindowResponsePropertiesScheduleCustomRecurring() *MaintenanceWindowResponsePropertiesScheduleCustomRecurring { + this := MaintenanceWindowResponsePropertiesScheduleCustomRecurring{} + return &this +} + +// NewMaintenanceWindowResponsePropertiesScheduleCustomRecurringWithDefaults instantiates a new MaintenanceWindowResponsePropertiesScheduleCustomRecurring object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMaintenanceWindowResponsePropertiesScheduleCustomRecurringWithDefaults() *MaintenanceWindowResponsePropertiesScheduleCustomRecurring { + this := MaintenanceWindowResponsePropertiesScheduleCustomRecurring{} + return &this +} + +// GetEnd returns the End field value if set, zero value otherwise. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetEnd() string { + if o == nil || IsNil(o.End) { + var ret string + return ret + } + return *o.End +} + +// GetEndOk returns a tuple with the End field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetEndOk() (*string, bool) { + if o == nil || IsNil(o.End) { + return nil, false + } + return o.End, true +} + +// HasEnd returns a boolean if a field has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) HasEnd() bool { + if o != nil && !IsNil(o.End) { + return true + } + + return false +} + +// SetEnd gets a reference to the given string and assigns it to the End field. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) SetEnd(v string) { + o.End = &v +} + +// GetEvery returns the Every field value if set, zero value otherwise. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetEvery() string { + if o == nil || IsNil(o.Every) { + var ret string + return ret + } + return *o.Every +} + +// GetEveryOk returns a tuple with the Every field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetEveryOk() (*string, bool) { + if o == nil || IsNil(o.Every) { + return nil, false + } + return o.Every, true +} + +// HasEvery returns a boolean if a field has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) HasEvery() bool { + if o != nil && !IsNil(o.Every) { + return true + } + + return false +} + +// SetEvery gets a reference to the given string and assigns it to the Every field. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) SetEvery(v string) { + o.Every = &v +} + +// GetOccurrences returns the Occurrences field value if set, zero value otherwise. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetOccurrences() float32 { + if o == nil || IsNil(o.Occurrences) { + var ret float32 + return ret + } + return *o.Occurrences +} + +// GetOccurrencesOk returns a tuple with the Occurrences field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetOccurrencesOk() (*float32, bool) { + if o == nil || IsNil(o.Occurrences) { + return nil, false + } + return o.Occurrences, true +} + +// HasOccurrences returns a boolean if a field has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) HasOccurrences() bool { + if o != nil && !IsNil(o.Occurrences) { + return true + } + + return false +} + +// SetOccurrences gets a reference to the given float32 and assigns it to the Occurrences field. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) SetOccurrences(v float32) { + o.Occurrences = &v +} + +// GetOnMonth returns the OnMonth field value if set, zero value otherwise. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetOnMonth() []float32 { + if o == nil || IsNil(o.OnMonth) { + var ret []float32 + return ret + } + return o.OnMonth +} + +// GetOnMonthOk returns a tuple with the OnMonth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetOnMonthOk() ([]float32, bool) { + if o == nil || IsNil(o.OnMonth) { + return nil, false + } + return o.OnMonth, true +} + +// HasOnMonth returns a boolean if a field has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) HasOnMonth() bool { + if o != nil && !IsNil(o.OnMonth) { + return true + } + + return false +} + +// SetOnMonth gets a reference to the given []float32 and assigns it to the OnMonth field. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) SetOnMonth(v []float32) { + o.OnMonth = v +} + +// GetOnMonthDay returns the OnMonthDay field value if set, zero value otherwise. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetOnMonthDay() []float32 { + if o == nil || IsNil(o.OnMonthDay) { + var ret []float32 + return ret + } + return o.OnMonthDay +} + +// GetOnMonthDayOk returns a tuple with the OnMonthDay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetOnMonthDayOk() ([]float32, bool) { + if o == nil || IsNil(o.OnMonthDay) { + return nil, false + } + return o.OnMonthDay, true +} + +// HasOnMonthDay returns a boolean if a field has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) HasOnMonthDay() bool { + if o != nil && !IsNil(o.OnMonthDay) { + return true + } + + return false +} + +// SetOnMonthDay gets a reference to the given []float32 and assigns it to the OnMonthDay field. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) SetOnMonthDay(v []float32) { + o.OnMonthDay = v +} + +// GetOnWeekDay returns the OnWeekDay field value if set, zero value otherwise. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetOnWeekDay() []string { + if o == nil || IsNil(o.OnWeekDay) { + var ret []string + return ret + } + return o.OnWeekDay +} + +// GetOnWeekDayOk returns a tuple with the OnWeekDay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) GetOnWeekDayOk() ([]string, bool) { + if o == nil || IsNil(o.OnWeekDay) { + return nil, false + } + return o.OnWeekDay, true +} + +// HasOnWeekDay returns a boolean if a field has been set. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) HasOnWeekDay() bool { + if o != nil && !IsNil(o.OnWeekDay) { + return true + } + + return false +} + +// SetOnWeekDay gets a reference to the given []string and assigns it to the OnWeekDay field. +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) SetOnWeekDay(v []string) { + o.OnWeekDay = v +} + +func (o MaintenanceWindowResponsePropertiesScheduleCustomRecurring) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MaintenanceWindowResponsePropertiesScheduleCustomRecurring) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.End) { + toSerialize["end"] = o.End + } + if !IsNil(o.Every) { + toSerialize["every"] = o.Every + } + if !IsNil(o.Occurrences) { + toSerialize["occurrences"] = o.Occurrences + } + if !IsNil(o.OnMonth) { + toSerialize["onMonth"] = o.OnMonth + } + if !IsNil(o.OnMonthDay) { + toSerialize["onMonthDay"] = o.OnMonthDay + } + if !IsNil(o.OnWeekDay) { + toSerialize["onWeekDay"] = o.OnWeekDay + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) UnmarshalJSON(bytes []byte) (err error) { + varMaintenanceWindowResponsePropertiesScheduleCustomRecurring := _MaintenanceWindowResponsePropertiesScheduleCustomRecurring{} + + err = json.Unmarshal(bytes, &varMaintenanceWindowResponsePropertiesScheduleCustomRecurring) + + if err != nil { + return err + } + + *o = MaintenanceWindowResponsePropertiesScheduleCustomRecurring(varMaintenanceWindowResponsePropertiesScheduleCustomRecurring) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "end") + delete(additionalProperties, "every") + delete(additionalProperties, "occurrences") + delete(additionalProperties, "onMonth") + delete(additionalProperties, "onMonthDay") + delete(additionalProperties, "onWeekDay") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMaintenanceWindowResponsePropertiesScheduleCustomRecurring struct { + value *MaintenanceWindowResponsePropertiesScheduleCustomRecurring + isSet bool +} + +func (v NullableMaintenanceWindowResponsePropertiesScheduleCustomRecurring) Get() *MaintenanceWindowResponsePropertiesScheduleCustomRecurring { + return v.value +} + +func (v *NullableMaintenanceWindowResponsePropertiesScheduleCustomRecurring) Set(val *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) { + v.value = val + v.isSet = true +} + +func (v NullableMaintenanceWindowResponsePropertiesScheduleCustomRecurring) IsSet() bool { + return v.isSet +} + +func (v *NullableMaintenanceWindowResponsePropertiesScheduleCustomRecurring) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMaintenanceWindowResponsePropertiesScheduleCustomRecurring(val *MaintenanceWindowResponsePropertiesScheduleCustomRecurring) *NullableMaintenanceWindowResponsePropertiesScheduleCustomRecurring { + return &NullableMaintenanceWindowResponsePropertiesScheduleCustomRecurring{value: val, isSet: true} +} + +func (v NullableMaintenanceWindowResponsePropertiesScheduleCustomRecurring) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMaintenanceWindowResponsePropertiesScheduleCustomRecurring) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_maintenance_window_response_properties_scope.go b/generated/alerting/model_maintenance_window_response_properties_scope.go new file mode 100644 index 000000000..691d758d5 --- /dev/null +++ b/generated/alerting/model_maintenance_window_response_properties_scope.go @@ -0,0 +1,144 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the MaintenanceWindowResponsePropertiesScope type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MaintenanceWindowResponsePropertiesScope{} + +// MaintenanceWindowResponsePropertiesScope struct for MaintenanceWindowResponsePropertiesScope +type MaintenanceWindowResponsePropertiesScope struct { + Alerting MaintenanceWindowResponsePropertiesScopeAlerting `json:"alerting"` + AdditionalProperties map[string]interface{} +} + +type _MaintenanceWindowResponsePropertiesScope MaintenanceWindowResponsePropertiesScope + +// NewMaintenanceWindowResponsePropertiesScope instantiates a new MaintenanceWindowResponsePropertiesScope object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMaintenanceWindowResponsePropertiesScope(alerting MaintenanceWindowResponsePropertiesScopeAlerting) *MaintenanceWindowResponsePropertiesScope { + this := MaintenanceWindowResponsePropertiesScope{} + this.Alerting = alerting + return &this +} + +// NewMaintenanceWindowResponsePropertiesScopeWithDefaults instantiates a new MaintenanceWindowResponsePropertiesScope object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMaintenanceWindowResponsePropertiesScopeWithDefaults() *MaintenanceWindowResponsePropertiesScope { + this := MaintenanceWindowResponsePropertiesScope{} + return &this +} + +// GetAlerting returns the Alerting field value +func (o *MaintenanceWindowResponsePropertiesScope) GetAlerting() MaintenanceWindowResponsePropertiesScopeAlerting { + if o == nil { + var ret MaintenanceWindowResponsePropertiesScopeAlerting + return ret + } + + return o.Alerting +} + +// GetAlertingOk returns a tuple with the Alerting field value +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponsePropertiesScope) GetAlertingOk() (*MaintenanceWindowResponsePropertiesScopeAlerting, bool) { + if o == nil { + return nil, false + } + return &o.Alerting, true +} + +// SetAlerting sets field value +func (o *MaintenanceWindowResponsePropertiesScope) SetAlerting(v MaintenanceWindowResponsePropertiesScopeAlerting) { + o.Alerting = v +} + +func (o MaintenanceWindowResponsePropertiesScope) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MaintenanceWindowResponsePropertiesScope) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["alerting"] = o.Alerting + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MaintenanceWindowResponsePropertiesScope) UnmarshalJSON(bytes []byte) (err error) { + varMaintenanceWindowResponsePropertiesScope := _MaintenanceWindowResponsePropertiesScope{} + + err = json.Unmarshal(bytes, &varMaintenanceWindowResponsePropertiesScope) + + if err != nil { + return err + } + + *o = MaintenanceWindowResponsePropertiesScope(varMaintenanceWindowResponsePropertiesScope) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "alerting") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMaintenanceWindowResponsePropertiesScope struct { + value *MaintenanceWindowResponsePropertiesScope + isSet bool +} + +func (v NullableMaintenanceWindowResponsePropertiesScope) Get() *MaintenanceWindowResponsePropertiesScope { + return v.value +} + +func (v *NullableMaintenanceWindowResponsePropertiesScope) Set(val *MaintenanceWindowResponsePropertiesScope) { + v.value = val + v.isSet = true +} + +func (v NullableMaintenanceWindowResponsePropertiesScope) IsSet() bool { + return v.isSet +} + +func (v *NullableMaintenanceWindowResponsePropertiesScope) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMaintenanceWindowResponsePropertiesScope(val *MaintenanceWindowResponsePropertiesScope) *NullableMaintenanceWindowResponsePropertiesScope { + return &NullableMaintenanceWindowResponsePropertiesScope{value: val, isSet: true} +} + +func (v NullableMaintenanceWindowResponsePropertiesScope) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMaintenanceWindowResponsePropertiesScope) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_maintenance_window_response_properties_scope_alerting.go b/generated/alerting/model_maintenance_window_response_properties_scope_alerting.go new file mode 100644 index 000000000..9c4f32bb7 --- /dev/null +++ b/generated/alerting/model_maintenance_window_response_properties_scope_alerting.go @@ -0,0 +1,144 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the MaintenanceWindowResponsePropertiesScopeAlerting type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MaintenanceWindowResponsePropertiesScopeAlerting{} + +// MaintenanceWindowResponsePropertiesScopeAlerting struct for MaintenanceWindowResponsePropertiesScopeAlerting +type MaintenanceWindowResponsePropertiesScopeAlerting struct { + Query MaintenanceWindowResponsePropertiesScopeAlertingQuery `json:"query"` + AdditionalProperties map[string]interface{} +} + +type _MaintenanceWindowResponsePropertiesScopeAlerting MaintenanceWindowResponsePropertiesScopeAlerting + +// NewMaintenanceWindowResponsePropertiesScopeAlerting instantiates a new MaintenanceWindowResponsePropertiesScopeAlerting object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMaintenanceWindowResponsePropertiesScopeAlerting(query MaintenanceWindowResponsePropertiesScopeAlertingQuery) *MaintenanceWindowResponsePropertiesScopeAlerting { + this := MaintenanceWindowResponsePropertiesScopeAlerting{} + this.Query = query + return &this +} + +// NewMaintenanceWindowResponsePropertiesScopeAlertingWithDefaults instantiates a new MaintenanceWindowResponsePropertiesScopeAlerting object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMaintenanceWindowResponsePropertiesScopeAlertingWithDefaults() *MaintenanceWindowResponsePropertiesScopeAlerting { + this := MaintenanceWindowResponsePropertiesScopeAlerting{} + return &this +} + +// GetQuery returns the Query field value +func (o *MaintenanceWindowResponsePropertiesScopeAlerting) GetQuery() MaintenanceWindowResponsePropertiesScopeAlertingQuery { + if o == nil { + var ret MaintenanceWindowResponsePropertiesScopeAlertingQuery + return ret + } + + return o.Query +} + +// GetQueryOk returns a tuple with the Query field value +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponsePropertiesScopeAlerting) GetQueryOk() (*MaintenanceWindowResponsePropertiesScopeAlertingQuery, bool) { + if o == nil { + return nil, false + } + return &o.Query, true +} + +// SetQuery sets field value +func (o *MaintenanceWindowResponsePropertiesScopeAlerting) SetQuery(v MaintenanceWindowResponsePropertiesScopeAlertingQuery) { + o.Query = v +} + +func (o MaintenanceWindowResponsePropertiesScopeAlerting) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MaintenanceWindowResponsePropertiesScopeAlerting) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["query"] = o.Query + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MaintenanceWindowResponsePropertiesScopeAlerting) UnmarshalJSON(bytes []byte) (err error) { + varMaintenanceWindowResponsePropertiesScopeAlerting := _MaintenanceWindowResponsePropertiesScopeAlerting{} + + err = json.Unmarshal(bytes, &varMaintenanceWindowResponsePropertiesScopeAlerting) + + if err != nil { + return err + } + + *o = MaintenanceWindowResponsePropertiesScopeAlerting(varMaintenanceWindowResponsePropertiesScopeAlerting) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "query") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMaintenanceWindowResponsePropertiesScopeAlerting struct { + value *MaintenanceWindowResponsePropertiesScopeAlerting + isSet bool +} + +func (v NullableMaintenanceWindowResponsePropertiesScopeAlerting) Get() *MaintenanceWindowResponsePropertiesScopeAlerting { + return v.value +} + +func (v *NullableMaintenanceWindowResponsePropertiesScopeAlerting) Set(val *MaintenanceWindowResponsePropertiesScopeAlerting) { + v.value = val + v.isSet = true +} + +func (v NullableMaintenanceWindowResponsePropertiesScopeAlerting) IsSet() bool { + return v.isSet +} + +func (v *NullableMaintenanceWindowResponsePropertiesScopeAlerting) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMaintenanceWindowResponsePropertiesScopeAlerting(val *MaintenanceWindowResponsePropertiesScopeAlerting) *NullableMaintenanceWindowResponsePropertiesScopeAlerting { + return &NullableMaintenanceWindowResponsePropertiesScopeAlerting{value: val, isSet: true} +} + +func (v NullableMaintenanceWindowResponsePropertiesScopeAlerting) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMaintenanceWindowResponsePropertiesScopeAlerting) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_maintenance_window_response_properties_scope_alerting_query.go b/generated/alerting/model_maintenance_window_response_properties_scope_alerting_query.go new file mode 100644 index 000000000..ffc39a10d --- /dev/null +++ b/generated/alerting/model_maintenance_window_response_properties_scope_alerting_query.go @@ -0,0 +1,145 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the MaintenanceWindowResponsePropertiesScopeAlertingQuery type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MaintenanceWindowResponsePropertiesScopeAlertingQuery{} + +// MaintenanceWindowResponsePropertiesScopeAlertingQuery struct for MaintenanceWindowResponsePropertiesScopeAlertingQuery +type MaintenanceWindowResponsePropertiesScopeAlertingQuery struct { + // A filter written in Kibana Query Language (KQL). + Kql string `json:"kql"` + AdditionalProperties map[string]interface{} +} + +type _MaintenanceWindowResponsePropertiesScopeAlertingQuery MaintenanceWindowResponsePropertiesScopeAlertingQuery + +// NewMaintenanceWindowResponsePropertiesScopeAlertingQuery instantiates a new MaintenanceWindowResponsePropertiesScopeAlertingQuery object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMaintenanceWindowResponsePropertiesScopeAlertingQuery(kql string) *MaintenanceWindowResponsePropertiesScopeAlertingQuery { + this := MaintenanceWindowResponsePropertiesScopeAlertingQuery{} + this.Kql = kql + return &this +} + +// NewMaintenanceWindowResponsePropertiesScopeAlertingQueryWithDefaults instantiates a new MaintenanceWindowResponsePropertiesScopeAlertingQuery object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMaintenanceWindowResponsePropertiesScopeAlertingQueryWithDefaults() *MaintenanceWindowResponsePropertiesScopeAlertingQuery { + this := MaintenanceWindowResponsePropertiesScopeAlertingQuery{} + return &this +} + +// GetKql returns the Kql field value +func (o *MaintenanceWindowResponsePropertiesScopeAlertingQuery) GetKql() string { + if o == nil { + var ret string + return ret + } + + return o.Kql +} + +// GetKqlOk returns a tuple with the Kql field value +// and a boolean to check if the value has been set. +func (o *MaintenanceWindowResponsePropertiesScopeAlertingQuery) GetKqlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kql, true +} + +// SetKql sets field value +func (o *MaintenanceWindowResponsePropertiesScopeAlertingQuery) SetKql(v string) { + o.Kql = v +} + +func (o MaintenanceWindowResponsePropertiesScopeAlertingQuery) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MaintenanceWindowResponsePropertiesScopeAlertingQuery) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["kql"] = o.Kql + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MaintenanceWindowResponsePropertiesScopeAlertingQuery) UnmarshalJSON(bytes []byte) (err error) { + varMaintenanceWindowResponsePropertiesScopeAlertingQuery := _MaintenanceWindowResponsePropertiesScopeAlertingQuery{} + + err = json.Unmarshal(bytes, &varMaintenanceWindowResponsePropertiesScopeAlertingQuery) + + if err != nil { + return err + } + + *o = MaintenanceWindowResponsePropertiesScopeAlertingQuery(varMaintenanceWindowResponsePropertiesScopeAlertingQuery) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "kql") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMaintenanceWindowResponsePropertiesScopeAlertingQuery struct { + value *MaintenanceWindowResponsePropertiesScopeAlertingQuery + isSet bool +} + +func (v NullableMaintenanceWindowResponsePropertiesScopeAlertingQuery) Get() *MaintenanceWindowResponsePropertiesScopeAlertingQuery { + return v.value +} + +func (v *NullableMaintenanceWindowResponsePropertiesScopeAlertingQuery) Set(val *MaintenanceWindowResponsePropertiesScopeAlertingQuery) { + v.value = val + v.isSet = true +} + +func (v NullableMaintenanceWindowResponsePropertiesScopeAlertingQuery) IsSet() bool { + return v.isSet +} + +func (v *NullableMaintenanceWindowResponsePropertiesScopeAlertingQuery) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMaintenanceWindowResponsePropertiesScopeAlertingQuery(val *MaintenanceWindowResponsePropertiesScopeAlertingQuery) *NullableMaintenanceWindowResponsePropertiesScopeAlertingQuery { + return &NullableMaintenanceWindowResponsePropertiesScopeAlertingQuery{value: val, isSet: true} +} + +func (v NullableMaintenanceWindowResponsePropertiesScopeAlertingQuery) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMaintenanceWindowResponsePropertiesScopeAlertingQuery) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_notify_when_action.go b/generated/alerting/model_notify_when_action.go new file mode 100644 index 000000000..1a05c22ef --- /dev/null +++ b/generated/alerting/model_notify_when_action.go @@ -0,0 +1,105 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" + "fmt" +) + +// NotifyWhenAction Indicates how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: You cannot specify `notify_when` at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values. +type NotifyWhenAction string + +// All allowed values of NotifyWhenAction enum +var AllowedNotifyWhenActionEnumValues = []NotifyWhenAction{ + "onActionGroupChange", + "onActiveAlert", + "onThrottleInterval", +} + +func (v *NotifyWhenAction) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := NotifyWhenAction(value) + for _, existing := range AllowedNotifyWhenActionEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid NotifyWhenAction", value) +} + +// NewNotifyWhenActionFromValue returns a pointer to a valid NotifyWhenAction +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewNotifyWhenActionFromValue(v string) (*NotifyWhenAction, error) { + ev := NotifyWhenAction(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for NotifyWhenAction: valid values are %v", v, AllowedNotifyWhenActionEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v NotifyWhenAction) IsValid() bool { + for _, existing := range AllowedNotifyWhenActionEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to notify_when_action value +func (v NotifyWhenAction) Ptr() *NotifyWhenAction { + return &v +} + +type NullableNotifyWhenAction struct { + value *NotifyWhenAction + isSet bool +} + +func (v NullableNotifyWhenAction) Get() *NotifyWhenAction { + return v.value +} + +func (v *NullableNotifyWhenAction) Set(val *NotifyWhenAction) { + v.value = val + v.isSet = true +} + +func (v NullableNotifyWhenAction) IsSet() bool { + return v.isSet +} + +func (v *NullableNotifyWhenAction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNotifyWhenAction(val *NotifyWhenAction) *NullableNotifyWhenAction { + return &NullableNotifyWhenAction{value: val, isSet: true} +} + +func (v NullableNotifyWhenAction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNotifyWhenAction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_patch_alerting_maintenance_window_id_request.go b/generated/alerting/model_patch_alerting_maintenance_window_id_request.go new file mode 100644 index 000000000..45494ae2e --- /dev/null +++ b/generated/alerting/model_patch_alerting_maintenance_window_id_request.go @@ -0,0 +1,268 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the PatchAlertingMaintenanceWindowIdRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchAlertingMaintenanceWindowIdRequest{} + +// PatchAlertingMaintenanceWindowIdRequest struct for PatchAlertingMaintenanceWindowIdRequest +type PatchAlertingMaintenanceWindowIdRequest struct { + // Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. + Enabled interface{} `json:"enabled,omitempty"` + Schedule *PostAlertingMaintenanceWindow200ResponseSchedule `json:"schedule,omitempty"` + Scope *PostAlertingMaintenanceWindowRequestScope `json:"scope,omitempty"` + // The name of the maintenance window. While this name does not have to be unique, a distinctive name can help you identify a specific maintenance window. + Title interface{} `json:"title,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchAlertingMaintenanceWindowIdRequest PatchAlertingMaintenanceWindowIdRequest + +// NewPatchAlertingMaintenanceWindowIdRequest instantiates a new PatchAlertingMaintenanceWindowIdRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchAlertingMaintenanceWindowIdRequest() *PatchAlertingMaintenanceWindowIdRequest { + this := PatchAlertingMaintenanceWindowIdRequest{} + return &this +} + +// NewPatchAlertingMaintenanceWindowIdRequestWithDefaults instantiates a new PatchAlertingMaintenanceWindowIdRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchAlertingMaintenanceWindowIdRequestWithDefaults() *PatchAlertingMaintenanceWindowIdRequest { + this := PatchAlertingMaintenanceWindowIdRequest{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchAlertingMaintenanceWindowIdRequest) GetEnabled() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchAlertingMaintenanceWindowIdRequest) GetEnabledOk() (*interface{}, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return &o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *PatchAlertingMaintenanceWindowIdRequest) HasEnabled() bool { + if o != nil && IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given interface{} and assigns it to the Enabled field. +func (o *PatchAlertingMaintenanceWindowIdRequest) SetEnabled(v interface{}) { + o.Enabled = v +} + +// GetSchedule returns the Schedule field value if set, zero value otherwise. +func (o *PatchAlertingMaintenanceWindowIdRequest) GetSchedule() PostAlertingMaintenanceWindow200ResponseSchedule { + if o == nil || IsNil(o.Schedule) { + var ret PostAlertingMaintenanceWindow200ResponseSchedule + return ret + } + return *o.Schedule +} + +// GetScheduleOk returns a tuple with the Schedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchAlertingMaintenanceWindowIdRequest) GetScheduleOk() (*PostAlertingMaintenanceWindow200ResponseSchedule, bool) { + if o == nil || IsNil(o.Schedule) { + return nil, false + } + return o.Schedule, true +} + +// HasSchedule returns a boolean if a field has been set. +func (o *PatchAlertingMaintenanceWindowIdRequest) HasSchedule() bool { + if o != nil && !IsNil(o.Schedule) { + return true + } + + return false +} + +// SetSchedule gets a reference to the given PostAlertingMaintenanceWindow200ResponseSchedule and assigns it to the Schedule field. +func (o *PatchAlertingMaintenanceWindowIdRequest) SetSchedule(v PostAlertingMaintenanceWindow200ResponseSchedule) { + o.Schedule = &v +} + +// GetScope returns the Scope field value if set, zero value otherwise. +func (o *PatchAlertingMaintenanceWindowIdRequest) GetScope() PostAlertingMaintenanceWindowRequestScope { + if o == nil || IsNil(o.Scope) { + var ret PostAlertingMaintenanceWindowRequestScope + return ret + } + return *o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchAlertingMaintenanceWindowIdRequest) GetScopeOk() (*PostAlertingMaintenanceWindowRequestScope, bool) { + if o == nil || IsNil(o.Scope) { + return nil, false + } + return o.Scope, true +} + +// HasScope returns a boolean if a field has been set. +func (o *PatchAlertingMaintenanceWindowIdRequest) HasScope() bool { + if o != nil && !IsNil(o.Scope) { + return true + } + + return false +} + +// SetScope gets a reference to the given PostAlertingMaintenanceWindowRequestScope and assigns it to the Scope field. +func (o *PatchAlertingMaintenanceWindowIdRequest) SetScope(v PostAlertingMaintenanceWindowRequestScope) { + o.Scope = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchAlertingMaintenanceWindowIdRequest) GetTitle() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchAlertingMaintenanceWindowIdRequest) GetTitleOk() (*interface{}, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return &o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *PatchAlertingMaintenanceWindowIdRequest) HasTitle() bool { + if o != nil && IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given interface{} and assigns it to the Title field. +func (o *PatchAlertingMaintenanceWindowIdRequest) SetTitle(v interface{}) { + o.Title = v +} + +func (o PatchAlertingMaintenanceWindowIdRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchAlertingMaintenanceWindowIdRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Enabled != nil { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.Schedule) { + toSerialize["schedule"] = o.Schedule + } + if !IsNil(o.Scope) { + toSerialize["scope"] = o.Scope + } + if o.Title != nil { + toSerialize["title"] = o.Title + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchAlertingMaintenanceWindowIdRequest) UnmarshalJSON(bytes []byte) (err error) { + varPatchAlertingMaintenanceWindowIdRequest := _PatchAlertingMaintenanceWindowIdRequest{} + + err = json.Unmarshal(bytes, &varPatchAlertingMaintenanceWindowIdRequest) + + if err != nil { + return err + } + + *o = PatchAlertingMaintenanceWindowIdRequest(varPatchAlertingMaintenanceWindowIdRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "enabled") + delete(additionalProperties, "schedule") + delete(additionalProperties, "scope") + delete(additionalProperties, "title") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchAlertingMaintenanceWindowIdRequest struct { + value *PatchAlertingMaintenanceWindowIdRequest + isSet bool +} + +func (v NullablePatchAlertingMaintenanceWindowIdRequest) Get() *PatchAlertingMaintenanceWindowIdRequest { + return v.value +} + +func (v *NullablePatchAlertingMaintenanceWindowIdRequest) Set(val *PatchAlertingMaintenanceWindowIdRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchAlertingMaintenanceWindowIdRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchAlertingMaintenanceWindowIdRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchAlertingMaintenanceWindowIdRequest(val *PatchAlertingMaintenanceWindowIdRequest) *NullablePatchAlertingMaintenanceWindowIdRequest { + return &NullablePatchAlertingMaintenanceWindowIdRequest{value: val, isSet: true} +} + +func (v NullablePatchAlertingMaintenanceWindowIdRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchAlertingMaintenanceWindowIdRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_post_alerting_maintenance_window_200_response.go b/generated/alerting/model_post_alerting_maintenance_window_200_response.go new file mode 100644 index 000000000..ce00251dd --- /dev/null +++ b/generated/alerting/model_post_alerting_maintenance_window_200_response.go @@ -0,0 +1,445 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the PostAlertingMaintenanceWindow200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostAlertingMaintenanceWindow200Response{} + +// PostAlertingMaintenanceWindow200Response struct for PostAlertingMaintenanceWindow200Response +type PostAlertingMaintenanceWindow200Response struct { + // The date and time when the maintenance window was created. + CreatedAt interface{} `json:"created_at"` + // The identifier for the user that created the maintenance window. + CreatedBy interface{} `json:"created_by"` + // Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. + Enabled interface{} `json:"enabled"` + // The identifier for the maintenance window. + Id interface{} `json:"id"` + Schedule PostAlertingMaintenanceWindow200ResponseSchedule `json:"schedule"` + Scope *PostAlertingMaintenanceWindowRequestScope `json:"scope,omitempty"` + // The current status of the maintenance window. + Status interface{} `json:"status"` + // The name of the maintenance window. + Title interface{} `json:"title"` + // The date and time when the maintenance window was last updated. + UpdatedAt interface{} `json:"updated_at"` + // The identifier for the user that last updated this maintenance window. + UpdatedBy interface{} `json:"updated_by"` + AdditionalProperties map[string]interface{} +} + +type _PostAlertingMaintenanceWindow200Response PostAlertingMaintenanceWindow200Response + +// NewPostAlertingMaintenanceWindow200Response instantiates a new PostAlertingMaintenanceWindow200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPostAlertingMaintenanceWindow200Response(createdAt interface{}, createdBy interface{}, enabled interface{}, id interface{}, schedule PostAlertingMaintenanceWindow200ResponseSchedule, status interface{}, title interface{}, updatedAt interface{}, updatedBy interface{}) *PostAlertingMaintenanceWindow200Response { + this := PostAlertingMaintenanceWindow200Response{} + this.CreatedAt = createdAt + this.CreatedBy = createdBy + this.Enabled = enabled + this.Id = id + this.Schedule = schedule + this.Status = status + this.Title = title + this.UpdatedAt = updatedAt + this.UpdatedBy = updatedBy + return &this +} + +// NewPostAlertingMaintenanceWindow200ResponseWithDefaults instantiates a new PostAlertingMaintenanceWindow200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPostAlertingMaintenanceWindow200ResponseWithDefaults() *PostAlertingMaintenanceWindow200Response { + this := PostAlertingMaintenanceWindow200Response{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *PostAlertingMaintenanceWindow200Response) GetCreatedAt() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200Response) GetCreatedAtOk() (*interface{}, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *PostAlertingMaintenanceWindow200Response) SetCreatedAt(v interface{}) { + o.CreatedAt = v +} + +// GetCreatedBy returns the CreatedBy field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *PostAlertingMaintenanceWindow200Response) GetCreatedBy() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.CreatedBy +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200Response) GetCreatedByOk() (*interface{}, bool) { + if o == nil || IsNil(o.CreatedBy) { + return nil, false + } + return &o.CreatedBy, true +} + +// SetCreatedBy sets field value +func (o *PostAlertingMaintenanceWindow200Response) SetCreatedBy(v interface{}) { + o.CreatedBy = v +} + +// GetEnabled returns the Enabled field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *PostAlertingMaintenanceWindow200Response) GetEnabled() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200Response) GetEnabledOk() (*interface{}, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *PostAlertingMaintenanceWindow200Response) SetEnabled(v interface{}) { + o.Enabled = v +} + +// GetId returns the Id field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *PostAlertingMaintenanceWindow200Response) GetId() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200Response) GetIdOk() (*interface{}, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *PostAlertingMaintenanceWindow200Response) SetId(v interface{}) { + o.Id = v +} + +// GetSchedule returns the Schedule field value +func (o *PostAlertingMaintenanceWindow200Response) GetSchedule() PostAlertingMaintenanceWindow200ResponseSchedule { + if o == nil { + var ret PostAlertingMaintenanceWindow200ResponseSchedule + return ret + } + + return o.Schedule +} + +// GetScheduleOk returns a tuple with the Schedule field value +// and a boolean to check if the value has been set. +func (o *PostAlertingMaintenanceWindow200Response) GetScheduleOk() (*PostAlertingMaintenanceWindow200ResponseSchedule, bool) { + if o == nil { + return nil, false + } + return &o.Schedule, true +} + +// SetSchedule sets field value +func (o *PostAlertingMaintenanceWindow200Response) SetSchedule(v PostAlertingMaintenanceWindow200ResponseSchedule) { + o.Schedule = v +} + +// GetScope returns the Scope field value if set, zero value otherwise. +func (o *PostAlertingMaintenanceWindow200Response) GetScope() PostAlertingMaintenanceWindowRequestScope { + if o == nil || IsNil(o.Scope) { + var ret PostAlertingMaintenanceWindowRequestScope + return ret + } + return *o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostAlertingMaintenanceWindow200Response) GetScopeOk() (*PostAlertingMaintenanceWindowRequestScope, bool) { + if o == nil || IsNil(o.Scope) { + return nil, false + } + return o.Scope, true +} + +// HasScope returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindow200Response) HasScope() bool { + if o != nil && !IsNil(o.Scope) { + return true + } + + return false +} + +// SetScope gets a reference to the given PostAlertingMaintenanceWindowRequestScope and assigns it to the Scope field. +func (o *PostAlertingMaintenanceWindow200Response) SetScope(v PostAlertingMaintenanceWindowRequestScope) { + o.Scope = &v +} + +// GetStatus returns the Status field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *PostAlertingMaintenanceWindow200Response) GetStatus() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200Response) GetStatusOk() (*interface{}, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *PostAlertingMaintenanceWindow200Response) SetStatus(v interface{}) { + o.Status = v +} + +// GetTitle returns the Title field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *PostAlertingMaintenanceWindow200Response) GetTitle() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200Response) GetTitleOk() (*interface{}, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *PostAlertingMaintenanceWindow200Response) SetTitle(v interface{}) { + o.Title = v +} + +// GetUpdatedAt returns the UpdatedAt field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *PostAlertingMaintenanceWindow200Response) GetUpdatedAt() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200Response) GetUpdatedAtOk() (*interface{}, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *PostAlertingMaintenanceWindow200Response) SetUpdatedAt(v interface{}) { + o.UpdatedAt = v +} + +// GetUpdatedBy returns the UpdatedBy field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *PostAlertingMaintenanceWindow200Response) GetUpdatedBy() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.UpdatedBy +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200Response) GetUpdatedByOk() (*interface{}, bool) { + if o == nil || IsNil(o.UpdatedBy) { + return nil, false + } + return &o.UpdatedBy, true +} + +// SetUpdatedBy sets field value +func (o *PostAlertingMaintenanceWindow200Response) SetUpdatedBy(v interface{}) { + o.UpdatedBy = v +} + +func (o PostAlertingMaintenanceWindow200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PostAlertingMaintenanceWindow200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.CreatedAt != nil { + toSerialize["created_at"] = o.CreatedAt + } + if o.CreatedBy != nil { + toSerialize["created_by"] = o.CreatedBy + } + if o.Enabled != nil { + toSerialize["enabled"] = o.Enabled + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + toSerialize["schedule"] = o.Schedule + if !IsNil(o.Scope) { + toSerialize["scope"] = o.Scope + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Title != nil { + toSerialize["title"] = o.Title + } + if o.UpdatedAt != nil { + toSerialize["updated_at"] = o.UpdatedAt + } + if o.UpdatedBy != nil { + toSerialize["updated_by"] = o.UpdatedBy + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PostAlertingMaintenanceWindow200Response) UnmarshalJSON(bytes []byte) (err error) { + varPostAlertingMaintenanceWindow200Response := _PostAlertingMaintenanceWindow200Response{} + + err = json.Unmarshal(bytes, &varPostAlertingMaintenanceWindow200Response) + + if err != nil { + return err + } + + *o = PostAlertingMaintenanceWindow200Response(varPostAlertingMaintenanceWindow200Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "created_at") + delete(additionalProperties, "created_by") + delete(additionalProperties, "enabled") + delete(additionalProperties, "id") + delete(additionalProperties, "schedule") + delete(additionalProperties, "scope") + delete(additionalProperties, "status") + delete(additionalProperties, "title") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "updated_by") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePostAlertingMaintenanceWindow200Response struct { + value *PostAlertingMaintenanceWindow200Response + isSet bool +} + +func (v NullablePostAlertingMaintenanceWindow200Response) Get() *PostAlertingMaintenanceWindow200Response { + return v.value +} + +func (v *NullablePostAlertingMaintenanceWindow200Response) Set(val *PostAlertingMaintenanceWindow200Response) { + v.value = val + v.isSet = true +} + +func (v NullablePostAlertingMaintenanceWindow200Response) IsSet() bool { + return v.isSet +} + +func (v *NullablePostAlertingMaintenanceWindow200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePostAlertingMaintenanceWindow200Response(val *PostAlertingMaintenanceWindow200Response) *NullablePostAlertingMaintenanceWindow200Response { + return &NullablePostAlertingMaintenanceWindow200Response{value: val, isSet: true} +} + +func (v NullablePostAlertingMaintenanceWindow200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePostAlertingMaintenanceWindow200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_post_alerting_maintenance_window_200_response_schedule.go b/generated/alerting/model_post_alerting_maintenance_window_200_response_schedule.go new file mode 100644 index 000000000..05d50baf0 --- /dev/null +++ b/generated/alerting/model_post_alerting_maintenance_window_200_response_schedule.go @@ -0,0 +1,144 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the PostAlertingMaintenanceWindow200ResponseSchedule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostAlertingMaintenanceWindow200ResponseSchedule{} + +// PostAlertingMaintenanceWindow200ResponseSchedule struct for PostAlertingMaintenanceWindow200ResponseSchedule +type PostAlertingMaintenanceWindow200ResponseSchedule struct { + Custom PostAlertingMaintenanceWindow200ResponseScheduleCustom `json:"custom"` + AdditionalProperties map[string]interface{} +} + +type _PostAlertingMaintenanceWindow200ResponseSchedule PostAlertingMaintenanceWindow200ResponseSchedule + +// NewPostAlertingMaintenanceWindow200ResponseSchedule instantiates a new PostAlertingMaintenanceWindow200ResponseSchedule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPostAlertingMaintenanceWindow200ResponseSchedule(custom PostAlertingMaintenanceWindow200ResponseScheduleCustom) *PostAlertingMaintenanceWindow200ResponseSchedule { + this := PostAlertingMaintenanceWindow200ResponseSchedule{} + this.Custom = custom + return &this +} + +// NewPostAlertingMaintenanceWindow200ResponseScheduleWithDefaults instantiates a new PostAlertingMaintenanceWindow200ResponseSchedule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPostAlertingMaintenanceWindow200ResponseScheduleWithDefaults() *PostAlertingMaintenanceWindow200ResponseSchedule { + this := PostAlertingMaintenanceWindow200ResponseSchedule{} + return &this +} + +// GetCustom returns the Custom field value +func (o *PostAlertingMaintenanceWindow200ResponseSchedule) GetCustom() PostAlertingMaintenanceWindow200ResponseScheduleCustom { + if o == nil { + var ret PostAlertingMaintenanceWindow200ResponseScheduleCustom + return ret + } + + return o.Custom +} + +// GetCustomOk returns a tuple with the Custom field value +// and a boolean to check if the value has been set. +func (o *PostAlertingMaintenanceWindow200ResponseSchedule) GetCustomOk() (*PostAlertingMaintenanceWindow200ResponseScheduleCustom, bool) { + if o == nil { + return nil, false + } + return &o.Custom, true +} + +// SetCustom sets field value +func (o *PostAlertingMaintenanceWindow200ResponseSchedule) SetCustom(v PostAlertingMaintenanceWindow200ResponseScheduleCustom) { + o.Custom = v +} + +func (o PostAlertingMaintenanceWindow200ResponseSchedule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PostAlertingMaintenanceWindow200ResponseSchedule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["custom"] = o.Custom + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PostAlertingMaintenanceWindow200ResponseSchedule) UnmarshalJSON(bytes []byte) (err error) { + varPostAlertingMaintenanceWindow200ResponseSchedule := _PostAlertingMaintenanceWindow200ResponseSchedule{} + + err = json.Unmarshal(bytes, &varPostAlertingMaintenanceWindow200ResponseSchedule) + + if err != nil { + return err + } + + *o = PostAlertingMaintenanceWindow200ResponseSchedule(varPostAlertingMaintenanceWindow200ResponseSchedule) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "custom") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePostAlertingMaintenanceWindow200ResponseSchedule struct { + value *PostAlertingMaintenanceWindow200ResponseSchedule + isSet bool +} + +func (v NullablePostAlertingMaintenanceWindow200ResponseSchedule) Get() *PostAlertingMaintenanceWindow200ResponseSchedule { + return v.value +} + +func (v *NullablePostAlertingMaintenanceWindow200ResponseSchedule) Set(val *PostAlertingMaintenanceWindow200ResponseSchedule) { + v.value = val + v.isSet = true +} + +func (v NullablePostAlertingMaintenanceWindow200ResponseSchedule) IsSet() bool { + return v.isSet +} + +func (v *NullablePostAlertingMaintenanceWindow200ResponseSchedule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePostAlertingMaintenanceWindow200ResponseSchedule(val *PostAlertingMaintenanceWindow200ResponseSchedule) *NullablePostAlertingMaintenanceWindow200ResponseSchedule { + return &NullablePostAlertingMaintenanceWindow200ResponseSchedule{value: val, isSet: true} +} + +func (v NullablePostAlertingMaintenanceWindow200ResponseSchedule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePostAlertingMaintenanceWindow200ResponseSchedule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_post_alerting_maintenance_window_200_response_schedule_custom.go b/generated/alerting/model_post_alerting_maintenance_window_200_response_schedule_custom.go new file mode 100644 index 000000000..de3b63089 --- /dev/null +++ b/generated/alerting/model_post_alerting_maintenance_window_200_response_schedule_custom.go @@ -0,0 +1,258 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the PostAlertingMaintenanceWindow200ResponseScheduleCustom type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostAlertingMaintenanceWindow200ResponseScheduleCustom{} + +// PostAlertingMaintenanceWindow200ResponseScheduleCustom struct for PostAlertingMaintenanceWindow200ResponseScheduleCustom +type PostAlertingMaintenanceWindow200ResponseScheduleCustom struct { + // The duration of the schedule. It allows values in `` format. `` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`. + Duration interface{} `json:"duration"` + Recurring *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring `json:"recurring,omitempty"` + // The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`. + Start interface{} `json:"start"` + // The timezone of the schedule. The default timezone is UTC. + Timezone interface{} `json:"timezone,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PostAlertingMaintenanceWindow200ResponseScheduleCustom PostAlertingMaintenanceWindow200ResponseScheduleCustom + +// NewPostAlertingMaintenanceWindow200ResponseScheduleCustom instantiates a new PostAlertingMaintenanceWindow200ResponseScheduleCustom object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPostAlertingMaintenanceWindow200ResponseScheduleCustom(duration interface{}, start interface{}) *PostAlertingMaintenanceWindow200ResponseScheduleCustom { + this := PostAlertingMaintenanceWindow200ResponseScheduleCustom{} + this.Duration = duration + this.Start = start + return &this +} + +// NewPostAlertingMaintenanceWindow200ResponseScheduleCustomWithDefaults instantiates a new PostAlertingMaintenanceWindow200ResponseScheduleCustom object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPostAlertingMaintenanceWindow200ResponseScheduleCustomWithDefaults() *PostAlertingMaintenanceWindow200ResponseScheduleCustom { + this := PostAlertingMaintenanceWindow200ResponseScheduleCustom{} + return &this +} + +// GetDuration returns the Duration field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) GetDuration() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Duration +} + +// GetDurationOk returns a tuple with the Duration field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) GetDurationOk() (*interface{}, bool) { + if o == nil || IsNil(o.Duration) { + return nil, false + } + return &o.Duration, true +} + +// SetDuration sets field value +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) SetDuration(v interface{}) { + o.Duration = v +} + +// GetRecurring returns the Recurring field value if set, zero value otherwise. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) GetRecurring() PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring { + if o == nil || IsNil(o.Recurring) { + var ret PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring + return ret + } + return *o.Recurring +} + +// GetRecurringOk returns a tuple with the Recurring field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) GetRecurringOk() (*PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring, bool) { + if o == nil || IsNil(o.Recurring) { + return nil, false + } + return o.Recurring, true +} + +// HasRecurring returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) HasRecurring() bool { + if o != nil && !IsNil(o.Recurring) { + return true + } + + return false +} + +// SetRecurring gets a reference to the given PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring and assigns it to the Recurring field. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) SetRecurring(v PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) { + o.Recurring = &v +} + +// GetStart returns the Start field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) GetStart() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Start +} + +// GetStartOk returns a tuple with the Start field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) GetStartOk() (*interface{}, bool) { + if o == nil || IsNil(o.Start) { + return nil, false + } + return &o.Start, true +} + +// SetStart sets field value +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) SetStart(v interface{}) { + o.Start = v +} + +// GetTimezone returns the Timezone field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) GetTimezone() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Timezone +} + +// GetTimezoneOk returns a tuple with the Timezone field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) GetTimezoneOk() (*interface{}, bool) { + if o == nil || IsNil(o.Timezone) { + return nil, false + } + return &o.Timezone, true +} + +// HasTimezone returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) HasTimezone() bool { + if o != nil && IsNil(o.Timezone) { + return true + } + + return false +} + +// SetTimezone gets a reference to the given interface{} and assigns it to the Timezone field. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) SetTimezone(v interface{}) { + o.Timezone = v +} + +func (o PostAlertingMaintenanceWindow200ResponseScheduleCustom) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PostAlertingMaintenanceWindow200ResponseScheduleCustom) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Duration != nil { + toSerialize["duration"] = o.Duration + } + if !IsNil(o.Recurring) { + toSerialize["recurring"] = o.Recurring + } + if o.Start != nil { + toSerialize["start"] = o.Start + } + if o.Timezone != nil { + toSerialize["timezone"] = o.Timezone + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustom) UnmarshalJSON(bytes []byte) (err error) { + varPostAlertingMaintenanceWindow200ResponseScheduleCustom := _PostAlertingMaintenanceWindow200ResponseScheduleCustom{} + + err = json.Unmarshal(bytes, &varPostAlertingMaintenanceWindow200ResponseScheduleCustom) + + if err != nil { + return err + } + + *o = PostAlertingMaintenanceWindow200ResponseScheduleCustom(varPostAlertingMaintenanceWindow200ResponseScheduleCustom) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "duration") + delete(additionalProperties, "recurring") + delete(additionalProperties, "start") + delete(additionalProperties, "timezone") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePostAlertingMaintenanceWindow200ResponseScheduleCustom struct { + value *PostAlertingMaintenanceWindow200ResponseScheduleCustom + isSet bool +} + +func (v NullablePostAlertingMaintenanceWindow200ResponseScheduleCustom) Get() *PostAlertingMaintenanceWindow200ResponseScheduleCustom { + return v.value +} + +func (v *NullablePostAlertingMaintenanceWindow200ResponseScheduleCustom) Set(val *PostAlertingMaintenanceWindow200ResponseScheduleCustom) { + v.value = val + v.isSet = true +} + +func (v NullablePostAlertingMaintenanceWindow200ResponseScheduleCustom) IsSet() bool { + return v.isSet +} + +func (v *NullablePostAlertingMaintenanceWindow200ResponseScheduleCustom) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePostAlertingMaintenanceWindow200ResponseScheduleCustom(val *PostAlertingMaintenanceWindow200ResponseScheduleCustom) *NullablePostAlertingMaintenanceWindow200ResponseScheduleCustom { + return &NullablePostAlertingMaintenanceWindow200ResponseScheduleCustom{value: val, isSet: true} +} + +func (v NullablePostAlertingMaintenanceWindow200ResponseScheduleCustom) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePostAlertingMaintenanceWindow200ResponseScheduleCustom) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_post_alerting_maintenance_window_200_response_schedule_custom_recurring.go b/generated/alerting/model_post_alerting_maintenance_window_200_response_schedule_custom_recurring.go new file mode 100644 index 000000000..b2ff8b88c --- /dev/null +++ b/generated/alerting/model_post_alerting_maintenance_window_200_response_schedule_custom_recurring.go @@ -0,0 +1,350 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring{} + +// PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring struct for PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring +type PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring struct { + // The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`. + End interface{} `json:"end,omitempty"` + // The interval and frequency of a recurring schedule. It allows values in `` format. `` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`. + Every interface{} `json:"every,omitempty"` + // The total number of recurrences of the schedule. + Occurrences interface{} `json:"occurrences,omitempty"` + // The specific months for a recurring schedule. Valid values are 1-12. + OnMonth interface{} `json:"onMonth,omitempty"` + // The specific days of the month for a recurring schedule. Valid values are 1-31. + OnMonthDay interface{} `json:"onMonthDay,omitempty"` + // The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule. + OnWeekDay interface{} `json:"onWeekDay,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring + +// NewPostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring instantiates a new PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring() *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring { + this := PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring{} + return &this +} + +// NewPostAlertingMaintenanceWindow200ResponseScheduleCustomRecurringWithDefaults instantiates a new PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPostAlertingMaintenanceWindow200ResponseScheduleCustomRecurringWithDefaults() *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring { + this := PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring{} + return &this +} + +// GetEnd returns the End field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetEnd() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.End +} + +// GetEndOk returns a tuple with the End field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetEndOk() (*interface{}, bool) { + if o == nil || IsNil(o.End) { + return nil, false + } + return &o.End, true +} + +// HasEnd returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) HasEnd() bool { + if o != nil && IsNil(o.End) { + return true + } + + return false +} + +// SetEnd gets a reference to the given interface{} and assigns it to the End field. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetEnd(v interface{}) { + o.End = v +} + +// GetEvery returns the Every field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetEvery() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Every +} + +// GetEveryOk returns a tuple with the Every field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetEveryOk() (*interface{}, bool) { + if o == nil || IsNil(o.Every) { + return nil, false + } + return &o.Every, true +} + +// HasEvery returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) HasEvery() bool { + if o != nil && IsNil(o.Every) { + return true + } + + return false +} + +// SetEvery gets a reference to the given interface{} and assigns it to the Every field. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetEvery(v interface{}) { + o.Every = v +} + +// GetOccurrences returns the Occurrences field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetOccurrences() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Occurrences +} + +// GetOccurrencesOk returns a tuple with the Occurrences field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetOccurrencesOk() (*interface{}, bool) { + if o == nil || IsNil(o.Occurrences) { + return nil, false + } + return &o.Occurrences, true +} + +// HasOccurrences returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) HasOccurrences() bool { + if o != nil && IsNil(o.Occurrences) { + return true + } + + return false +} + +// SetOccurrences gets a reference to the given interface{} and assigns it to the Occurrences field. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetOccurrences(v interface{}) { + o.Occurrences = v +} + +// GetOnMonth returns the OnMonth field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnMonth() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.OnMonth +} + +// GetOnMonthOk returns a tuple with the OnMonth field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnMonthOk() (*interface{}, bool) { + if o == nil || IsNil(o.OnMonth) { + return nil, false + } + return &o.OnMonth, true +} + +// HasOnMonth returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) HasOnMonth() bool { + if o != nil && IsNil(o.OnMonth) { + return true + } + + return false +} + +// SetOnMonth gets a reference to the given interface{} and assigns it to the OnMonth field. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnMonth(v interface{}) { + o.OnMonth = v +} + +// GetOnMonthDay returns the OnMonthDay field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnMonthDay() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.OnMonthDay +} + +// GetOnMonthDayOk returns a tuple with the OnMonthDay field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnMonthDayOk() (*interface{}, bool) { + if o == nil || IsNil(o.OnMonthDay) { + return nil, false + } + return &o.OnMonthDay, true +} + +// HasOnMonthDay returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) HasOnMonthDay() bool { + if o != nil && IsNil(o.OnMonthDay) { + return true + } + + return false +} + +// SetOnMonthDay gets a reference to the given interface{} and assigns it to the OnMonthDay field. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnMonthDay(v interface{}) { + o.OnMonthDay = v +} + +// GetOnWeekDay returns the OnWeekDay field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnWeekDay() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.OnWeekDay +} + +// GetOnWeekDayOk returns a tuple with the OnWeekDay field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) GetOnWeekDayOk() (*interface{}, bool) { + if o == nil || IsNil(o.OnWeekDay) { + return nil, false + } + return &o.OnWeekDay, true +} + +// HasOnWeekDay returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) HasOnWeekDay() bool { + if o != nil && IsNil(o.OnWeekDay) { + return true + } + + return false +} + +// SetOnWeekDay gets a reference to the given interface{} and assigns it to the OnWeekDay field. +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) SetOnWeekDay(v interface{}) { + o.OnWeekDay = v +} + +func (o PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.End != nil { + toSerialize["end"] = o.End + } + if o.Every != nil { + toSerialize["every"] = o.Every + } + if o.Occurrences != nil { + toSerialize["occurrences"] = o.Occurrences + } + if o.OnMonth != nil { + toSerialize["onMonth"] = o.OnMonth + } + if o.OnMonthDay != nil { + toSerialize["onMonthDay"] = o.OnMonthDay + } + if o.OnWeekDay != nil { + toSerialize["onWeekDay"] = o.OnWeekDay + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) UnmarshalJSON(bytes []byte) (err error) { + varPostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring := _PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring{} + + err = json.Unmarshal(bytes, &varPostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) + + if err != nil { + return err + } + + *o = PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring(varPostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "end") + delete(additionalProperties, "every") + delete(additionalProperties, "occurrences") + delete(additionalProperties, "onMonth") + delete(additionalProperties, "onMonthDay") + delete(additionalProperties, "onWeekDay") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring struct { + value *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring + isSet bool +} + +func (v NullablePostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) Get() *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring { + return v.value +} + +func (v *NullablePostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) Set(val *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) { + v.value = val + v.isSet = true +} + +func (v NullablePostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) IsSet() bool { + return v.isSet +} + +func (v *NullablePostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring(val *PostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) *NullablePostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring { + return &NullablePostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring{value: val, isSet: true} +} + +func (v NullablePostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePostAlertingMaintenanceWindow200ResponseScheduleCustomRecurring) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_post_alerting_maintenance_window_request.go b/generated/alerting/model_post_alerting_maintenance_window_request.go new file mode 100644 index 000000000..b44d307a5 --- /dev/null +++ b/generated/alerting/model_post_alerting_maintenance_window_request.go @@ -0,0 +1,253 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the PostAlertingMaintenanceWindowRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostAlertingMaintenanceWindowRequest{} + +// PostAlertingMaintenanceWindowRequest struct for PostAlertingMaintenanceWindowRequest +type PostAlertingMaintenanceWindowRequest struct { + // Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. + Enabled interface{} `json:"enabled,omitempty"` + Schedule PostAlertingMaintenanceWindowRequestSchedule `json:"schedule"` + Scope *PostAlertingMaintenanceWindowRequestScope `json:"scope,omitempty"` + // The name of the maintenance window. While this name does not have to be unique, a distinctive name can help you identify a specific maintenance window. + Title interface{} `json:"title"` + AdditionalProperties map[string]interface{} +} + +type _PostAlertingMaintenanceWindowRequest PostAlertingMaintenanceWindowRequest + +// NewPostAlertingMaintenanceWindowRequest instantiates a new PostAlertingMaintenanceWindowRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPostAlertingMaintenanceWindowRequest(schedule PostAlertingMaintenanceWindowRequestSchedule, title interface{}) *PostAlertingMaintenanceWindowRequest { + this := PostAlertingMaintenanceWindowRequest{} + this.Schedule = schedule + this.Title = title + return &this +} + +// NewPostAlertingMaintenanceWindowRequestWithDefaults instantiates a new PostAlertingMaintenanceWindowRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPostAlertingMaintenanceWindowRequestWithDefaults() *PostAlertingMaintenanceWindowRequest { + this := PostAlertingMaintenanceWindowRequest{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PostAlertingMaintenanceWindowRequest) GetEnabled() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindowRequest) GetEnabledOk() (*interface{}, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return &o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindowRequest) HasEnabled() bool { + if o != nil && IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given interface{} and assigns it to the Enabled field. +func (o *PostAlertingMaintenanceWindowRequest) SetEnabled(v interface{}) { + o.Enabled = v +} + +// GetSchedule returns the Schedule field value +func (o *PostAlertingMaintenanceWindowRequest) GetSchedule() PostAlertingMaintenanceWindowRequestSchedule { + if o == nil { + var ret PostAlertingMaintenanceWindowRequestSchedule + return ret + } + + return o.Schedule +} + +// GetScheduleOk returns a tuple with the Schedule field value +// and a boolean to check if the value has been set. +func (o *PostAlertingMaintenanceWindowRequest) GetScheduleOk() (*PostAlertingMaintenanceWindowRequestSchedule, bool) { + if o == nil { + return nil, false + } + return &o.Schedule, true +} + +// SetSchedule sets field value +func (o *PostAlertingMaintenanceWindowRequest) SetSchedule(v PostAlertingMaintenanceWindowRequestSchedule) { + o.Schedule = v +} + +// GetScope returns the Scope field value if set, zero value otherwise. +func (o *PostAlertingMaintenanceWindowRequest) GetScope() PostAlertingMaintenanceWindowRequestScope { + if o == nil || IsNil(o.Scope) { + var ret PostAlertingMaintenanceWindowRequestScope + return ret + } + return *o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostAlertingMaintenanceWindowRequest) GetScopeOk() (*PostAlertingMaintenanceWindowRequestScope, bool) { + if o == nil || IsNil(o.Scope) { + return nil, false + } + return o.Scope, true +} + +// HasScope returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindowRequest) HasScope() bool { + if o != nil && !IsNil(o.Scope) { + return true + } + + return false +} + +// SetScope gets a reference to the given PostAlertingMaintenanceWindowRequestScope and assigns it to the Scope field. +func (o *PostAlertingMaintenanceWindowRequest) SetScope(v PostAlertingMaintenanceWindowRequestScope) { + o.Scope = &v +} + +// GetTitle returns the Title field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *PostAlertingMaintenanceWindowRequest) GetTitle() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindowRequest) GetTitleOk() (*interface{}, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *PostAlertingMaintenanceWindowRequest) SetTitle(v interface{}) { + o.Title = v +} + +func (o PostAlertingMaintenanceWindowRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PostAlertingMaintenanceWindowRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Enabled != nil { + toSerialize["enabled"] = o.Enabled + } + toSerialize["schedule"] = o.Schedule + if !IsNil(o.Scope) { + toSerialize["scope"] = o.Scope + } + if o.Title != nil { + toSerialize["title"] = o.Title + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PostAlertingMaintenanceWindowRequest) UnmarshalJSON(bytes []byte) (err error) { + varPostAlertingMaintenanceWindowRequest := _PostAlertingMaintenanceWindowRequest{} + + err = json.Unmarshal(bytes, &varPostAlertingMaintenanceWindowRequest) + + if err != nil { + return err + } + + *o = PostAlertingMaintenanceWindowRequest(varPostAlertingMaintenanceWindowRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "enabled") + delete(additionalProperties, "schedule") + delete(additionalProperties, "scope") + delete(additionalProperties, "title") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePostAlertingMaintenanceWindowRequest struct { + value *PostAlertingMaintenanceWindowRequest + isSet bool +} + +func (v NullablePostAlertingMaintenanceWindowRequest) Get() *PostAlertingMaintenanceWindowRequest { + return v.value +} + +func (v *NullablePostAlertingMaintenanceWindowRequest) Set(val *PostAlertingMaintenanceWindowRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePostAlertingMaintenanceWindowRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePostAlertingMaintenanceWindowRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePostAlertingMaintenanceWindowRequest(val *PostAlertingMaintenanceWindowRequest) *NullablePostAlertingMaintenanceWindowRequest { + return &NullablePostAlertingMaintenanceWindowRequest{value: val, isSet: true} +} + +func (v NullablePostAlertingMaintenanceWindowRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePostAlertingMaintenanceWindowRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_post_alerting_maintenance_window_request_schedule.go b/generated/alerting/model_post_alerting_maintenance_window_request_schedule.go new file mode 100644 index 000000000..968844d71 --- /dev/null +++ b/generated/alerting/model_post_alerting_maintenance_window_request_schedule.go @@ -0,0 +1,144 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the PostAlertingMaintenanceWindowRequestSchedule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostAlertingMaintenanceWindowRequestSchedule{} + +// PostAlertingMaintenanceWindowRequestSchedule struct for PostAlertingMaintenanceWindowRequestSchedule +type PostAlertingMaintenanceWindowRequestSchedule struct { + Custom PostAlertingMaintenanceWindowRequestScheduleCustom `json:"custom"` + AdditionalProperties map[string]interface{} +} + +type _PostAlertingMaintenanceWindowRequestSchedule PostAlertingMaintenanceWindowRequestSchedule + +// NewPostAlertingMaintenanceWindowRequestSchedule instantiates a new PostAlertingMaintenanceWindowRequestSchedule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPostAlertingMaintenanceWindowRequestSchedule(custom PostAlertingMaintenanceWindowRequestScheduleCustom) *PostAlertingMaintenanceWindowRequestSchedule { + this := PostAlertingMaintenanceWindowRequestSchedule{} + this.Custom = custom + return &this +} + +// NewPostAlertingMaintenanceWindowRequestScheduleWithDefaults instantiates a new PostAlertingMaintenanceWindowRequestSchedule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPostAlertingMaintenanceWindowRequestScheduleWithDefaults() *PostAlertingMaintenanceWindowRequestSchedule { + this := PostAlertingMaintenanceWindowRequestSchedule{} + return &this +} + +// GetCustom returns the Custom field value +func (o *PostAlertingMaintenanceWindowRequestSchedule) GetCustom() PostAlertingMaintenanceWindowRequestScheduleCustom { + if o == nil { + var ret PostAlertingMaintenanceWindowRequestScheduleCustom + return ret + } + + return o.Custom +} + +// GetCustomOk returns a tuple with the Custom field value +// and a boolean to check if the value has been set. +func (o *PostAlertingMaintenanceWindowRequestSchedule) GetCustomOk() (*PostAlertingMaintenanceWindowRequestScheduleCustom, bool) { + if o == nil { + return nil, false + } + return &o.Custom, true +} + +// SetCustom sets field value +func (o *PostAlertingMaintenanceWindowRequestSchedule) SetCustom(v PostAlertingMaintenanceWindowRequestScheduleCustom) { + o.Custom = v +} + +func (o PostAlertingMaintenanceWindowRequestSchedule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PostAlertingMaintenanceWindowRequestSchedule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["custom"] = o.Custom + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PostAlertingMaintenanceWindowRequestSchedule) UnmarshalJSON(bytes []byte) (err error) { + varPostAlertingMaintenanceWindowRequestSchedule := _PostAlertingMaintenanceWindowRequestSchedule{} + + err = json.Unmarshal(bytes, &varPostAlertingMaintenanceWindowRequestSchedule) + + if err != nil { + return err + } + + *o = PostAlertingMaintenanceWindowRequestSchedule(varPostAlertingMaintenanceWindowRequestSchedule) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "custom") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePostAlertingMaintenanceWindowRequestSchedule struct { + value *PostAlertingMaintenanceWindowRequestSchedule + isSet bool +} + +func (v NullablePostAlertingMaintenanceWindowRequestSchedule) Get() *PostAlertingMaintenanceWindowRequestSchedule { + return v.value +} + +func (v *NullablePostAlertingMaintenanceWindowRequestSchedule) Set(val *PostAlertingMaintenanceWindowRequestSchedule) { + v.value = val + v.isSet = true +} + +func (v NullablePostAlertingMaintenanceWindowRequestSchedule) IsSet() bool { + return v.isSet +} + +func (v *NullablePostAlertingMaintenanceWindowRequestSchedule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePostAlertingMaintenanceWindowRequestSchedule(val *PostAlertingMaintenanceWindowRequestSchedule) *NullablePostAlertingMaintenanceWindowRequestSchedule { + return &NullablePostAlertingMaintenanceWindowRequestSchedule{value: val, isSet: true} +} + +func (v NullablePostAlertingMaintenanceWindowRequestSchedule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePostAlertingMaintenanceWindowRequestSchedule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_post_alerting_maintenance_window_request_schedule_custom.go b/generated/alerting/model_post_alerting_maintenance_window_request_schedule_custom.go new file mode 100644 index 000000000..9921907cf --- /dev/null +++ b/generated/alerting/model_post_alerting_maintenance_window_request_schedule_custom.go @@ -0,0 +1,258 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the PostAlertingMaintenanceWindowRequestScheduleCustom type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostAlertingMaintenanceWindowRequestScheduleCustom{} + +// PostAlertingMaintenanceWindowRequestScheduleCustom struct for PostAlertingMaintenanceWindowRequestScheduleCustom +type PostAlertingMaintenanceWindowRequestScheduleCustom struct { + // The duration of the schedule. It allows values in `` format. `` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`. + Duration interface{} `json:"duration"` + Recurring *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring `json:"recurring,omitempty"` + // The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`. + Start interface{} `json:"start"` + // The timezone of the schedule. The default timezone is UTC. + Timezone interface{} `json:"timezone,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PostAlertingMaintenanceWindowRequestScheduleCustom PostAlertingMaintenanceWindowRequestScheduleCustom + +// NewPostAlertingMaintenanceWindowRequestScheduleCustom instantiates a new PostAlertingMaintenanceWindowRequestScheduleCustom object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPostAlertingMaintenanceWindowRequestScheduleCustom(duration interface{}, start interface{}) *PostAlertingMaintenanceWindowRequestScheduleCustom { + this := PostAlertingMaintenanceWindowRequestScheduleCustom{} + this.Duration = duration + this.Start = start + return &this +} + +// NewPostAlertingMaintenanceWindowRequestScheduleCustomWithDefaults instantiates a new PostAlertingMaintenanceWindowRequestScheduleCustom object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPostAlertingMaintenanceWindowRequestScheduleCustomWithDefaults() *PostAlertingMaintenanceWindowRequestScheduleCustom { + this := PostAlertingMaintenanceWindowRequestScheduleCustom{} + return &this +} + +// GetDuration returns the Duration field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) GetDuration() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Duration +} + +// GetDurationOk returns a tuple with the Duration field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) GetDurationOk() (*interface{}, bool) { + if o == nil || IsNil(o.Duration) { + return nil, false + } + return &o.Duration, true +} + +// SetDuration sets field value +func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) SetDuration(v interface{}) { + o.Duration = v +} + +// GetRecurring returns the Recurring field value if set, zero value otherwise. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) GetRecurring() PostAlertingMaintenanceWindowRequestScheduleCustomRecurring { + if o == nil || IsNil(o.Recurring) { + var ret PostAlertingMaintenanceWindowRequestScheduleCustomRecurring + return ret + } + return *o.Recurring +} + +// GetRecurringOk returns a tuple with the Recurring field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) GetRecurringOk() (*PostAlertingMaintenanceWindowRequestScheduleCustomRecurring, bool) { + if o == nil || IsNil(o.Recurring) { + return nil, false + } + return o.Recurring, true +} + +// HasRecurring returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) HasRecurring() bool { + if o != nil && !IsNil(o.Recurring) { + return true + } + + return false +} + +// SetRecurring gets a reference to the given PostAlertingMaintenanceWindowRequestScheduleCustomRecurring and assigns it to the Recurring field. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) SetRecurring(v PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) { + o.Recurring = &v +} + +// GetStart returns the Start field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) GetStart() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Start +} + +// GetStartOk returns a tuple with the Start field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) GetStartOk() (*interface{}, bool) { + if o == nil || IsNil(o.Start) { + return nil, false + } + return &o.Start, true +} + +// SetStart sets field value +func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) SetStart(v interface{}) { + o.Start = v +} + +// GetTimezone returns the Timezone field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) GetTimezone() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Timezone +} + +// GetTimezoneOk returns a tuple with the Timezone field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) GetTimezoneOk() (*interface{}, bool) { + if o == nil || IsNil(o.Timezone) { + return nil, false + } + return &o.Timezone, true +} + +// HasTimezone returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) HasTimezone() bool { + if o != nil && IsNil(o.Timezone) { + return true + } + + return false +} + +// SetTimezone gets a reference to the given interface{} and assigns it to the Timezone field. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) SetTimezone(v interface{}) { + o.Timezone = v +} + +func (o PostAlertingMaintenanceWindowRequestScheduleCustom) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PostAlertingMaintenanceWindowRequestScheduleCustom) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Duration != nil { + toSerialize["duration"] = o.Duration + } + if !IsNil(o.Recurring) { + toSerialize["recurring"] = o.Recurring + } + if o.Start != nil { + toSerialize["start"] = o.Start + } + if o.Timezone != nil { + toSerialize["timezone"] = o.Timezone + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PostAlertingMaintenanceWindowRequestScheduleCustom) UnmarshalJSON(bytes []byte) (err error) { + varPostAlertingMaintenanceWindowRequestScheduleCustom := _PostAlertingMaintenanceWindowRequestScheduleCustom{} + + err = json.Unmarshal(bytes, &varPostAlertingMaintenanceWindowRequestScheduleCustom) + + if err != nil { + return err + } + + *o = PostAlertingMaintenanceWindowRequestScheduleCustom(varPostAlertingMaintenanceWindowRequestScheduleCustom) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "duration") + delete(additionalProperties, "recurring") + delete(additionalProperties, "start") + delete(additionalProperties, "timezone") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePostAlertingMaintenanceWindowRequestScheduleCustom struct { + value *PostAlertingMaintenanceWindowRequestScheduleCustom + isSet bool +} + +func (v NullablePostAlertingMaintenanceWindowRequestScheduleCustom) Get() *PostAlertingMaintenanceWindowRequestScheduleCustom { + return v.value +} + +func (v *NullablePostAlertingMaintenanceWindowRequestScheduleCustom) Set(val *PostAlertingMaintenanceWindowRequestScheduleCustom) { + v.value = val + v.isSet = true +} + +func (v NullablePostAlertingMaintenanceWindowRequestScheduleCustom) IsSet() bool { + return v.isSet +} + +func (v *NullablePostAlertingMaintenanceWindowRequestScheduleCustom) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePostAlertingMaintenanceWindowRequestScheduleCustom(val *PostAlertingMaintenanceWindowRequestScheduleCustom) *NullablePostAlertingMaintenanceWindowRequestScheduleCustom { + return &NullablePostAlertingMaintenanceWindowRequestScheduleCustom{value: val, isSet: true} +} + +func (v NullablePostAlertingMaintenanceWindowRequestScheduleCustom) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePostAlertingMaintenanceWindowRequestScheduleCustom) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_post_alerting_maintenance_window_request_schedule_custom_recurring.go b/generated/alerting/model_post_alerting_maintenance_window_request_schedule_custom_recurring.go new file mode 100644 index 000000000..4f510f2ac --- /dev/null +++ b/generated/alerting/model_post_alerting_maintenance_window_request_schedule_custom_recurring.go @@ -0,0 +1,350 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the PostAlertingMaintenanceWindowRequestScheduleCustomRecurring type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostAlertingMaintenanceWindowRequestScheduleCustomRecurring{} + +// PostAlertingMaintenanceWindowRequestScheduleCustomRecurring struct for PostAlertingMaintenanceWindowRequestScheduleCustomRecurring +type PostAlertingMaintenanceWindowRequestScheduleCustomRecurring struct { + // The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`. + End interface{} `json:"end,omitempty"` + // The interval and frequency of a recurring schedule. It allows values in `` format. `` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`. + Every interface{} `json:"every,omitempty"` + // The total number of recurrences of the schedule. + Occurrences interface{} `json:"occurrences,omitempty"` + // The specific months for a recurring schedule. Valid values are 1-12. + OnMonth interface{} `json:"onMonth,omitempty"` + // The specific days of the month for a recurring schedule. Valid values are 1-31. + OnMonthDay interface{} `json:"onMonthDay,omitempty"` + // The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule. + OnWeekDay interface{} `json:"onWeekDay,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PostAlertingMaintenanceWindowRequestScheduleCustomRecurring PostAlertingMaintenanceWindowRequestScheduleCustomRecurring + +// NewPostAlertingMaintenanceWindowRequestScheduleCustomRecurring instantiates a new PostAlertingMaintenanceWindowRequestScheduleCustomRecurring object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPostAlertingMaintenanceWindowRequestScheduleCustomRecurring() *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring { + this := PostAlertingMaintenanceWindowRequestScheduleCustomRecurring{} + return &this +} + +// NewPostAlertingMaintenanceWindowRequestScheduleCustomRecurringWithDefaults instantiates a new PostAlertingMaintenanceWindowRequestScheduleCustomRecurring object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPostAlertingMaintenanceWindowRequestScheduleCustomRecurringWithDefaults() *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring { + this := PostAlertingMaintenanceWindowRequestScheduleCustomRecurring{} + return &this +} + +// GetEnd returns the End field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetEnd() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.End +} + +// GetEndOk returns a tuple with the End field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetEndOk() (*interface{}, bool) { + if o == nil || IsNil(o.End) { + return nil, false + } + return &o.End, true +} + +// HasEnd returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) HasEnd() bool { + if o != nil && IsNil(o.End) { + return true + } + + return false +} + +// SetEnd gets a reference to the given interface{} and assigns it to the End field. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetEnd(v interface{}) { + o.End = v +} + +// GetEvery returns the Every field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetEvery() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Every +} + +// GetEveryOk returns a tuple with the Every field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetEveryOk() (*interface{}, bool) { + if o == nil || IsNil(o.Every) { + return nil, false + } + return &o.Every, true +} + +// HasEvery returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) HasEvery() bool { + if o != nil && IsNil(o.Every) { + return true + } + + return false +} + +// SetEvery gets a reference to the given interface{} and assigns it to the Every field. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetEvery(v interface{}) { + o.Every = v +} + +// GetOccurrences returns the Occurrences field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetOccurrences() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Occurrences +} + +// GetOccurrencesOk returns a tuple with the Occurrences field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetOccurrencesOk() (*interface{}, bool) { + if o == nil || IsNil(o.Occurrences) { + return nil, false + } + return &o.Occurrences, true +} + +// HasOccurrences returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) HasOccurrences() bool { + if o != nil && IsNil(o.Occurrences) { + return true + } + + return false +} + +// SetOccurrences gets a reference to the given interface{} and assigns it to the Occurrences field. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetOccurrences(v interface{}) { + o.Occurrences = v +} + +// GetOnMonth returns the OnMonth field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonth() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.OnMonth +} + +// GetOnMonthOk returns a tuple with the OnMonth field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthOk() (*interface{}, bool) { + if o == nil || IsNil(o.OnMonth) { + return nil, false + } + return &o.OnMonth, true +} + +// HasOnMonth returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) HasOnMonth() bool { + if o != nil && IsNil(o.OnMonth) { + return true + } + + return false +} + +// SetOnMonth gets a reference to the given interface{} and assigns it to the OnMonth field. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetOnMonth(v interface{}) { + o.OnMonth = v +} + +// GetOnMonthDay returns the OnMonthDay field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthDay() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.OnMonthDay +} + +// GetOnMonthDayOk returns a tuple with the OnMonthDay field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthDayOk() (*interface{}, bool) { + if o == nil || IsNil(o.OnMonthDay) { + return nil, false + } + return &o.OnMonthDay, true +} + +// HasOnMonthDay returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) HasOnMonthDay() bool { + if o != nil && IsNil(o.OnMonthDay) { + return true + } + + return false +} + +// SetOnMonthDay gets a reference to the given interface{} and assigns it to the OnMonthDay field. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetOnMonthDay(v interface{}) { + o.OnMonthDay = v +} + +// GetOnWeekDay returns the OnWeekDay field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetOnWeekDay() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.OnWeekDay +} + +// GetOnWeekDayOk returns a tuple with the OnWeekDay field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) GetOnWeekDayOk() (*interface{}, bool) { + if o == nil || IsNil(o.OnWeekDay) { + return nil, false + } + return &o.OnWeekDay, true +} + +// HasOnWeekDay returns a boolean if a field has been set. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) HasOnWeekDay() bool { + if o != nil && IsNil(o.OnWeekDay) { + return true + } + + return false +} + +// SetOnWeekDay gets a reference to the given interface{} and assigns it to the OnWeekDay field. +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) SetOnWeekDay(v interface{}) { + o.OnWeekDay = v +} + +func (o PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.End != nil { + toSerialize["end"] = o.End + } + if o.Every != nil { + toSerialize["every"] = o.Every + } + if o.Occurrences != nil { + toSerialize["occurrences"] = o.Occurrences + } + if o.OnMonth != nil { + toSerialize["onMonth"] = o.OnMonth + } + if o.OnMonthDay != nil { + toSerialize["onMonthDay"] = o.OnMonthDay + } + if o.OnWeekDay != nil { + toSerialize["onWeekDay"] = o.OnWeekDay + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) UnmarshalJSON(bytes []byte) (err error) { + varPostAlertingMaintenanceWindowRequestScheduleCustomRecurring := _PostAlertingMaintenanceWindowRequestScheduleCustomRecurring{} + + err = json.Unmarshal(bytes, &varPostAlertingMaintenanceWindowRequestScheduleCustomRecurring) + + if err != nil { + return err + } + + *o = PostAlertingMaintenanceWindowRequestScheduleCustomRecurring(varPostAlertingMaintenanceWindowRequestScheduleCustomRecurring) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "end") + delete(additionalProperties, "every") + delete(additionalProperties, "occurrences") + delete(additionalProperties, "onMonth") + delete(additionalProperties, "onMonthDay") + delete(additionalProperties, "onWeekDay") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePostAlertingMaintenanceWindowRequestScheduleCustomRecurring struct { + value *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring + isSet bool +} + +func (v NullablePostAlertingMaintenanceWindowRequestScheduleCustomRecurring) Get() *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring { + return v.value +} + +func (v *NullablePostAlertingMaintenanceWindowRequestScheduleCustomRecurring) Set(val *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) { + v.value = val + v.isSet = true +} + +func (v NullablePostAlertingMaintenanceWindowRequestScheduleCustomRecurring) IsSet() bool { + return v.isSet +} + +func (v *NullablePostAlertingMaintenanceWindowRequestScheduleCustomRecurring) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePostAlertingMaintenanceWindowRequestScheduleCustomRecurring(val *PostAlertingMaintenanceWindowRequestScheduleCustomRecurring) *NullablePostAlertingMaintenanceWindowRequestScheduleCustomRecurring { + return &NullablePostAlertingMaintenanceWindowRequestScheduleCustomRecurring{value: val, isSet: true} +} + +func (v NullablePostAlertingMaintenanceWindowRequestScheduleCustomRecurring) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePostAlertingMaintenanceWindowRequestScheduleCustomRecurring) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_post_alerting_maintenance_window_request_scope.go b/generated/alerting/model_post_alerting_maintenance_window_request_scope.go new file mode 100644 index 000000000..b72213e90 --- /dev/null +++ b/generated/alerting/model_post_alerting_maintenance_window_request_scope.go @@ -0,0 +1,144 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the PostAlertingMaintenanceWindowRequestScope type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostAlertingMaintenanceWindowRequestScope{} + +// PostAlertingMaintenanceWindowRequestScope struct for PostAlertingMaintenanceWindowRequestScope +type PostAlertingMaintenanceWindowRequestScope struct { + Alerting PostAlertingMaintenanceWindowRequestScopeAlerting `json:"alerting"` + AdditionalProperties map[string]interface{} +} + +type _PostAlertingMaintenanceWindowRequestScope PostAlertingMaintenanceWindowRequestScope + +// NewPostAlertingMaintenanceWindowRequestScope instantiates a new PostAlertingMaintenanceWindowRequestScope object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPostAlertingMaintenanceWindowRequestScope(alerting PostAlertingMaintenanceWindowRequestScopeAlerting) *PostAlertingMaintenanceWindowRequestScope { + this := PostAlertingMaintenanceWindowRequestScope{} + this.Alerting = alerting + return &this +} + +// NewPostAlertingMaintenanceWindowRequestScopeWithDefaults instantiates a new PostAlertingMaintenanceWindowRequestScope object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPostAlertingMaintenanceWindowRequestScopeWithDefaults() *PostAlertingMaintenanceWindowRequestScope { + this := PostAlertingMaintenanceWindowRequestScope{} + return &this +} + +// GetAlerting returns the Alerting field value +func (o *PostAlertingMaintenanceWindowRequestScope) GetAlerting() PostAlertingMaintenanceWindowRequestScopeAlerting { + if o == nil { + var ret PostAlertingMaintenanceWindowRequestScopeAlerting + return ret + } + + return o.Alerting +} + +// GetAlertingOk returns a tuple with the Alerting field value +// and a boolean to check if the value has been set. +func (o *PostAlertingMaintenanceWindowRequestScope) GetAlertingOk() (*PostAlertingMaintenanceWindowRequestScopeAlerting, bool) { + if o == nil { + return nil, false + } + return &o.Alerting, true +} + +// SetAlerting sets field value +func (o *PostAlertingMaintenanceWindowRequestScope) SetAlerting(v PostAlertingMaintenanceWindowRequestScopeAlerting) { + o.Alerting = v +} + +func (o PostAlertingMaintenanceWindowRequestScope) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PostAlertingMaintenanceWindowRequestScope) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["alerting"] = o.Alerting + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PostAlertingMaintenanceWindowRequestScope) UnmarshalJSON(bytes []byte) (err error) { + varPostAlertingMaintenanceWindowRequestScope := _PostAlertingMaintenanceWindowRequestScope{} + + err = json.Unmarshal(bytes, &varPostAlertingMaintenanceWindowRequestScope) + + if err != nil { + return err + } + + *o = PostAlertingMaintenanceWindowRequestScope(varPostAlertingMaintenanceWindowRequestScope) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "alerting") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePostAlertingMaintenanceWindowRequestScope struct { + value *PostAlertingMaintenanceWindowRequestScope + isSet bool +} + +func (v NullablePostAlertingMaintenanceWindowRequestScope) Get() *PostAlertingMaintenanceWindowRequestScope { + return v.value +} + +func (v *NullablePostAlertingMaintenanceWindowRequestScope) Set(val *PostAlertingMaintenanceWindowRequestScope) { + v.value = val + v.isSet = true +} + +func (v NullablePostAlertingMaintenanceWindowRequestScope) IsSet() bool { + return v.isSet +} + +func (v *NullablePostAlertingMaintenanceWindowRequestScope) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePostAlertingMaintenanceWindowRequestScope(val *PostAlertingMaintenanceWindowRequestScope) *NullablePostAlertingMaintenanceWindowRequestScope { + return &NullablePostAlertingMaintenanceWindowRequestScope{value: val, isSet: true} +} + +func (v NullablePostAlertingMaintenanceWindowRequestScope) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePostAlertingMaintenanceWindowRequestScope) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_post_alerting_maintenance_window_request_scope_alerting.go b/generated/alerting/model_post_alerting_maintenance_window_request_scope_alerting.go new file mode 100644 index 000000000..b6edd0afb --- /dev/null +++ b/generated/alerting/model_post_alerting_maintenance_window_request_scope_alerting.go @@ -0,0 +1,144 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the PostAlertingMaintenanceWindowRequestScopeAlerting type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostAlertingMaintenanceWindowRequestScopeAlerting{} + +// PostAlertingMaintenanceWindowRequestScopeAlerting struct for PostAlertingMaintenanceWindowRequestScopeAlerting +type PostAlertingMaintenanceWindowRequestScopeAlerting struct { + Query PostAlertingMaintenanceWindowRequestScopeAlertingQuery `json:"query"` + AdditionalProperties map[string]interface{} +} + +type _PostAlertingMaintenanceWindowRequestScopeAlerting PostAlertingMaintenanceWindowRequestScopeAlerting + +// NewPostAlertingMaintenanceWindowRequestScopeAlerting instantiates a new PostAlertingMaintenanceWindowRequestScopeAlerting object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPostAlertingMaintenanceWindowRequestScopeAlerting(query PostAlertingMaintenanceWindowRequestScopeAlertingQuery) *PostAlertingMaintenanceWindowRequestScopeAlerting { + this := PostAlertingMaintenanceWindowRequestScopeAlerting{} + this.Query = query + return &this +} + +// NewPostAlertingMaintenanceWindowRequestScopeAlertingWithDefaults instantiates a new PostAlertingMaintenanceWindowRequestScopeAlerting object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPostAlertingMaintenanceWindowRequestScopeAlertingWithDefaults() *PostAlertingMaintenanceWindowRequestScopeAlerting { + this := PostAlertingMaintenanceWindowRequestScopeAlerting{} + return &this +} + +// GetQuery returns the Query field value +func (o *PostAlertingMaintenanceWindowRequestScopeAlerting) GetQuery() PostAlertingMaintenanceWindowRequestScopeAlertingQuery { + if o == nil { + var ret PostAlertingMaintenanceWindowRequestScopeAlertingQuery + return ret + } + + return o.Query +} + +// GetQueryOk returns a tuple with the Query field value +// and a boolean to check if the value has been set. +func (o *PostAlertingMaintenanceWindowRequestScopeAlerting) GetQueryOk() (*PostAlertingMaintenanceWindowRequestScopeAlertingQuery, bool) { + if o == nil { + return nil, false + } + return &o.Query, true +} + +// SetQuery sets field value +func (o *PostAlertingMaintenanceWindowRequestScopeAlerting) SetQuery(v PostAlertingMaintenanceWindowRequestScopeAlertingQuery) { + o.Query = v +} + +func (o PostAlertingMaintenanceWindowRequestScopeAlerting) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PostAlertingMaintenanceWindowRequestScopeAlerting) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["query"] = o.Query + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PostAlertingMaintenanceWindowRequestScopeAlerting) UnmarshalJSON(bytes []byte) (err error) { + varPostAlertingMaintenanceWindowRequestScopeAlerting := _PostAlertingMaintenanceWindowRequestScopeAlerting{} + + err = json.Unmarshal(bytes, &varPostAlertingMaintenanceWindowRequestScopeAlerting) + + if err != nil { + return err + } + + *o = PostAlertingMaintenanceWindowRequestScopeAlerting(varPostAlertingMaintenanceWindowRequestScopeAlerting) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "query") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePostAlertingMaintenanceWindowRequestScopeAlerting struct { + value *PostAlertingMaintenanceWindowRequestScopeAlerting + isSet bool +} + +func (v NullablePostAlertingMaintenanceWindowRequestScopeAlerting) Get() *PostAlertingMaintenanceWindowRequestScopeAlerting { + return v.value +} + +func (v *NullablePostAlertingMaintenanceWindowRequestScopeAlerting) Set(val *PostAlertingMaintenanceWindowRequestScopeAlerting) { + v.value = val + v.isSet = true +} + +func (v NullablePostAlertingMaintenanceWindowRequestScopeAlerting) IsSet() bool { + return v.isSet +} + +func (v *NullablePostAlertingMaintenanceWindowRequestScopeAlerting) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePostAlertingMaintenanceWindowRequestScopeAlerting(val *PostAlertingMaintenanceWindowRequestScopeAlerting) *NullablePostAlertingMaintenanceWindowRequestScopeAlerting { + return &NullablePostAlertingMaintenanceWindowRequestScopeAlerting{value: val, isSet: true} +} + +func (v NullablePostAlertingMaintenanceWindowRequestScopeAlerting) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePostAlertingMaintenanceWindowRequestScopeAlerting) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_post_alerting_maintenance_window_request_scope_alerting_query.go b/generated/alerting/model_post_alerting_maintenance_window_request_scope_alerting_query.go new file mode 100644 index 000000000..d5575ae9b --- /dev/null +++ b/generated/alerting/model_post_alerting_maintenance_window_request_scope_alerting_query.go @@ -0,0 +1,149 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the PostAlertingMaintenanceWindowRequestScopeAlertingQuery type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostAlertingMaintenanceWindowRequestScopeAlertingQuery{} + +// PostAlertingMaintenanceWindowRequestScopeAlertingQuery struct for PostAlertingMaintenanceWindowRequestScopeAlertingQuery +type PostAlertingMaintenanceWindowRequestScopeAlertingQuery struct { + // A filter written in Kibana Query Language (KQL). + Kql interface{} `json:"kql"` + AdditionalProperties map[string]interface{} +} + +type _PostAlertingMaintenanceWindowRequestScopeAlertingQuery PostAlertingMaintenanceWindowRequestScopeAlertingQuery + +// NewPostAlertingMaintenanceWindowRequestScopeAlertingQuery instantiates a new PostAlertingMaintenanceWindowRequestScopeAlertingQuery object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPostAlertingMaintenanceWindowRequestScopeAlertingQuery(kql interface{}) *PostAlertingMaintenanceWindowRequestScopeAlertingQuery { + this := PostAlertingMaintenanceWindowRequestScopeAlertingQuery{} + this.Kql = kql + return &this +} + +// NewPostAlertingMaintenanceWindowRequestScopeAlertingQueryWithDefaults instantiates a new PostAlertingMaintenanceWindowRequestScopeAlertingQuery object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPostAlertingMaintenanceWindowRequestScopeAlertingQueryWithDefaults() *PostAlertingMaintenanceWindowRequestScopeAlertingQuery { + this := PostAlertingMaintenanceWindowRequestScopeAlertingQuery{} + return &this +} + +// GetKql returns the Kql field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *PostAlertingMaintenanceWindowRequestScopeAlertingQuery) GetKql() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Kql +} + +// GetKqlOk returns a tuple with the Kql field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PostAlertingMaintenanceWindowRequestScopeAlertingQuery) GetKqlOk() (*interface{}, bool) { + if o == nil || IsNil(o.Kql) { + return nil, false + } + return &o.Kql, true +} + +// SetKql sets field value +func (o *PostAlertingMaintenanceWindowRequestScopeAlertingQuery) SetKql(v interface{}) { + o.Kql = v +} + +func (o PostAlertingMaintenanceWindowRequestScopeAlertingQuery) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PostAlertingMaintenanceWindowRequestScopeAlertingQuery) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Kql != nil { + toSerialize["kql"] = o.Kql + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PostAlertingMaintenanceWindowRequestScopeAlertingQuery) UnmarshalJSON(bytes []byte) (err error) { + varPostAlertingMaintenanceWindowRequestScopeAlertingQuery := _PostAlertingMaintenanceWindowRequestScopeAlertingQuery{} + + err = json.Unmarshal(bytes, &varPostAlertingMaintenanceWindowRequestScopeAlertingQuery) + + if err != nil { + return err + } + + *o = PostAlertingMaintenanceWindowRequestScopeAlertingQuery(varPostAlertingMaintenanceWindowRequestScopeAlertingQuery) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "kql") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePostAlertingMaintenanceWindowRequestScopeAlertingQuery struct { + value *PostAlertingMaintenanceWindowRequestScopeAlertingQuery + isSet bool +} + +func (v NullablePostAlertingMaintenanceWindowRequestScopeAlertingQuery) Get() *PostAlertingMaintenanceWindowRequestScopeAlertingQuery { + return v.value +} + +func (v *NullablePostAlertingMaintenanceWindowRequestScopeAlertingQuery) Set(val *PostAlertingMaintenanceWindowRequestScopeAlertingQuery) { + v.value = val + v.isSet = true +} + +func (v NullablePostAlertingMaintenanceWindowRequestScopeAlertingQuery) IsSet() bool { + return v.isSet +} + +func (v *NullablePostAlertingMaintenanceWindowRequestScopeAlertingQuery) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePostAlertingMaintenanceWindowRequestScopeAlertingQuery(val *PostAlertingMaintenanceWindowRequestScopeAlertingQuery) *NullablePostAlertingMaintenanceWindowRequestScopeAlertingQuery { + return &NullablePostAlertingMaintenanceWindowRequestScopeAlertingQuery{value: val, isSet: true} +} + +func (v NullablePostAlertingMaintenanceWindowRequestScopeAlertingQuery) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePostAlertingMaintenanceWindowRequestScopeAlertingQuery) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_update_maintenance_window_request.go b/generated/alerting/model_update_maintenance_window_request.go new file mode 100644 index 000000000..8613f387d --- /dev/null +++ b/generated/alerting/model_update_maintenance_window_request.go @@ -0,0 +1,234 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the UpdateMaintenanceWindowRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateMaintenanceWindowRequest{} + +// UpdateMaintenanceWindowRequest struct for UpdateMaintenanceWindowRequest +type UpdateMaintenanceWindowRequest struct { + // Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. + Enabled *bool `json:"enabled,omitempty"` + Schedule *CreateMaintenanceWindowRequestSchedule `json:"schedule,omitempty"` + Scope *CreateMaintenanceWindowRequestScope `json:"scope,omitempty"` + // The name of the maintenance window. While this name does not have to be unique, a distinctive name can help you identify a specific maintenance window. + Title *string `json:"title,omitempty"` +} + +// NewUpdateMaintenanceWindowRequest instantiates a new UpdateMaintenanceWindowRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateMaintenanceWindowRequest() *UpdateMaintenanceWindowRequest { + this := UpdateMaintenanceWindowRequest{} + return &this +} + +// NewUpdateMaintenanceWindowRequestWithDefaults instantiates a new UpdateMaintenanceWindowRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateMaintenanceWindowRequestWithDefaults() *UpdateMaintenanceWindowRequest { + this := UpdateMaintenanceWindowRequest{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *UpdateMaintenanceWindowRequest) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequest) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindowRequest) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *UpdateMaintenanceWindowRequest) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetSchedule returns the Schedule field value if set, zero value otherwise. +func (o *UpdateMaintenanceWindowRequest) GetSchedule() CreateMaintenanceWindowRequestSchedule { + if o == nil || IsNil(o.Schedule) { + var ret CreateMaintenanceWindowRequestSchedule + return ret + } + return *o.Schedule +} + +// GetScheduleOk returns a tuple with the Schedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequest) GetScheduleOk() (*CreateMaintenanceWindowRequestSchedule, bool) { + if o == nil || IsNil(o.Schedule) { + return nil, false + } + return o.Schedule, true +} + +// HasSchedule returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindowRequest) HasSchedule() bool { + if o != nil && !IsNil(o.Schedule) { + return true + } + + return false +} + +// SetSchedule gets a reference to the given CreateMaintenanceWindowRequestSchedule and assigns it to the Schedule field. +func (o *UpdateMaintenanceWindowRequest) SetSchedule(v CreateMaintenanceWindowRequestSchedule) { + o.Schedule = &v +} + +// GetScope returns the Scope field value if set, zero value otherwise. +func (o *UpdateMaintenanceWindowRequest) GetScope() CreateMaintenanceWindowRequestScope { + if o == nil || IsNil(o.Scope) { + var ret CreateMaintenanceWindowRequestScope + return ret + } + return *o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequest) GetScopeOk() (*CreateMaintenanceWindowRequestScope, bool) { + if o == nil || IsNil(o.Scope) { + return nil, false + } + return o.Scope, true +} + +// HasScope returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindowRequest) HasScope() bool { + if o != nil && !IsNil(o.Scope) { + return true + } + + return false +} + +// SetScope gets a reference to the given CreateMaintenanceWindowRequestScope and assigns it to the Scope field. +func (o *UpdateMaintenanceWindowRequest) SetScope(v CreateMaintenanceWindowRequestScope) { + o.Scope = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *UpdateMaintenanceWindowRequest) GetTitle() string { + if o == nil || IsNil(o.Title) { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequest) GetTitleOk() (*string, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindowRequest) HasTitle() bool { + if o != nil && !IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *UpdateMaintenanceWindowRequest) SetTitle(v string) { + o.Title = &v +} + +func (o UpdateMaintenanceWindowRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateMaintenanceWindowRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.Schedule) { + toSerialize["schedule"] = o.Schedule + } + if !IsNil(o.Scope) { + toSerialize["scope"] = o.Scope + } + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + return toSerialize, nil +} + +type NullableUpdateMaintenanceWindowRequest struct { + value *UpdateMaintenanceWindowRequest + isSet bool +} + +func (v NullableUpdateMaintenanceWindowRequest) Get() *UpdateMaintenanceWindowRequest { + return v.value +} + +func (v *NullableUpdateMaintenanceWindowRequest) Set(val *UpdateMaintenanceWindowRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateMaintenanceWindowRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateMaintenanceWindowRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateMaintenanceWindowRequest(val *UpdateMaintenanceWindowRequest) *NullableUpdateMaintenanceWindowRequest { + return &NullableUpdateMaintenanceWindowRequest{value: val, isSet: true} +} + +func (v NullableUpdateMaintenanceWindowRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateMaintenanceWindowRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_update_maintenance_window_request_schedule.go b/generated/alerting/model_update_maintenance_window_request_schedule.go new file mode 100644 index 000000000..8db59d2d6 --- /dev/null +++ b/generated/alerting/model_update_maintenance_window_request_schedule.go @@ -0,0 +1,144 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the UpdateMaintenanceWindowRequestSchedule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateMaintenanceWindowRequestSchedule{} + +// UpdateMaintenanceWindowRequestSchedule struct for UpdateMaintenanceWindowRequestSchedule +type UpdateMaintenanceWindowRequestSchedule struct { + Custom UpdateMaintenanceWindowRequestScheduleCustom `json:"custom"` + AdditionalProperties map[string]interface{} +} + +type _UpdateMaintenanceWindowRequestSchedule UpdateMaintenanceWindowRequestSchedule + +// NewUpdateMaintenanceWindowRequestSchedule instantiates a new UpdateMaintenanceWindowRequestSchedule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateMaintenanceWindowRequestSchedule(custom UpdateMaintenanceWindowRequestScheduleCustom) *UpdateMaintenanceWindowRequestSchedule { + this := UpdateMaintenanceWindowRequestSchedule{} + this.Custom = custom + return &this +} + +// NewUpdateMaintenanceWindowRequestScheduleWithDefaults instantiates a new UpdateMaintenanceWindowRequestSchedule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateMaintenanceWindowRequestScheduleWithDefaults() *UpdateMaintenanceWindowRequestSchedule { + this := UpdateMaintenanceWindowRequestSchedule{} + return &this +} + +// GetCustom returns the Custom field value +func (o *UpdateMaintenanceWindowRequestSchedule) GetCustom() UpdateMaintenanceWindowRequestScheduleCustom { + if o == nil { + var ret UpdateMaintenanceWindowRequestScheduleCustom + return ret + } + + return o.Custom +} + +// GetCustomOk returns a tuple with the Custom field value +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequestSchedule) GetCustomOk() (*UpdateMaintenanceWindowRequestScheduleCustom, bool) { + if o == nil { + return nil, false + } + return &o.Custom, true +} + +// SetCustom sets field value +func (o *UpdateMaintenanceWindowRequestSchedule) SetCustom(v UpdateMaintenanceWindowRequestScheduleCustom) { + o.Custom = v +} + +func (o UpdateMaintenanceWindowRequestSchedule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateMaintenanceWindowRequestSchedule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["custom"] = o.Custom + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateMaintenanceWindowRequestSchedule) UnmarshalJSON(bytes []byte) (err error) { + varUpdateMaintenanceWindowRequestSchedule := _UpdateMaintenanceWindowRequestSchedule{} + + err = json.Unmarshal(bytes, &varUpdateMaintenanceWindowRequestSchedule) + + if err != nil { + return err + } + + *o = UpdateMaintenanceWindowRequestSchedule(varUpdateMaintenanceWindowRequestSchedule) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "custom") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateMaintenanceWindowRequestSchedule struct { + value *UpdateMaintenanceWindowRequestSchedule + isSet bool +} + +func (v NullableUpdateMaintenanceWindowRequestSchedule) Get() *UpdateMaintenanceWindowRequestSchedule { + return v.value +} + +func (v *NullableUpdateMaintenanceWindowRequestSchedule) Set(val *UpdateMaintenanceWindowRequestSchedule) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateMaintenanceWindowRequestSchedule) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateMaintenanceWindowRequestSchedule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateMaintenanceWindowRequestSchedule(val *UpdateMaintenanceWindowRequestSchedule) *NullableUpdateMaintenanceWindowRequestSchedule { + return &NullableUpdateMaintenanceWindowRequestSchedule{value: val, isSet: true} +} + +func (v NullableUpdateMaintenanceWindowRequestSchedule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateMaintenanceWindowRequestSchedule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_update_maintenance_window_request_schedule_custom.go b/generated/alerting/model_update_maintenance_window_request_schedule_custom.go new file mode 100644 index 000000000..43a73219c --- /dev/null +++ b/generated/alerting/model_update_maintenance_window_request_schedule_custom.go @@ -0,0 +1,249 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the UpdateMaintenanceWindowRequestScheduleCustom type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateMaintenanceWindowRequestScheduleCustom{} + +// UpdateMaintenanceWindowRequestScheduleCustom struct for UpdateMaintenanceWindowRequestScheduleCustom +type UpdateMaintenanceWindowRequestScheduleCustom struct { + // The duration of the schedule. It allows values in `` format. `` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`. + Duration string `json:"duration"` + Recurring *UpdateMaintenanceWindowRequestScheduleCustomRecurring `json:"recurring,omitempty"` + // The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`. + Start string `json:"start"` + // The timezone of the schedule. The default timezone is UTC. + Timezone *string `json:"timezone,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateMaintenanceWindowRequestScheduleCustom UpdateMaintenanceWindowRequestScheduleCustom + +// NewUpdateMaintenanceWindowRequestScheduleCustom instantiates a new UpdateMaintenanceWindowRequestScheduleCustom object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateMaintenanceWindowRequestScheduleCustom(duration string, start string) *UpdateMaintenanceWindowRequestScheduleCustom { + this := UpdateMaintenanceWindowRequestScheduleCustom{} + this.Duration = duration + this.Start = start + return &this +} + +// NewUpdateMaintenanceWindowRequestScheduleCustomWithDefaults instantiates a new UpdateMaintenanceWindowRequestScheduleCustom object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateMaintenanceWindowRequestScheduleCustomWithDefaults() *UpdateMaintenanceWindowRequestScheduleCustom { + this := UpdateMaintenanceWindowRequestScheduleCustom{} + return &this +} + +// GetDuration returns the Duration field value +func (o *UpdateMaintenanceWindowRequestScheduleCustom) GetDuration() string { + if o == nil { + var ret string + return ret + } + + return o.Duration +} + +// GetDurationOk returns a tuple with the Duration field value +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequestScheduleCustom) GetDurationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Duration, true +} + +// SetDuration sets field value +func (o *UpdateMaintenanceWindowRequestScheduleCustom) SetDuration(v string) { + o.Duration = v +} + +// GetRecurring returns the Recurring field value if set, zero value otherwise. +func (o *UpdateMaintenanceWindowRequestScheduleCustom) GetRecurring() UpdateMaintenanceWindowRequestScheduleCustomRecurring { + if o == nil || IsNil(o.Recurring) { + var ret UpdateMaintenanceWindowRequestScheduleCustomRecurring + return ret + } + return *o.Recurring +} + +// GetRecurringOk returns a tuple with the Recurring field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequestScheduleCustom) GetRecurringOk() (*UpdateMaintenanceWindowRequestScheduleCustomRecurring, bool) { + if o == nil || IsNil(o.Recurring) { + return nil, false + } + return o.Recurring, true +} + +// HasRecurring returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindowRequestScheduleCustom) HasRecurring() bool { + if o != nil && !IsNil(o.Recurring) { + return true + } + + return false +} + +// SetRecurring gets a reference to the given UpdateMaintenanceWindowRequestScheduleCustomRecurring and assigns it to the Recurring field. +func (o *UpdateMaintenanceWindowRequestScheduleCustom) SetRecurring(v UpdateMaintenanceWindowRequestScheduleCustomRecurring) { + o.Recurring = &v +} + +// GetStart returns the Start field value +func (o *UpdateMaintenanceWindowRequestScheduleCustom) GetStart() string { + if o == nil { + var ret string + return ret + } + + return o.Start +} + +// GetStartOk returns a tuple with the Start field value +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequestScheduleCustom) GetStartOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Start, true +} + +// SetStart sets field value +func (o *UpdateMaintenanceWindowRequestScheduleCustom) SetStart(v string) { + o.Start = v +} + +// GetTimezone returns the Timezone field value if set, zero value otherwise. +func (o *UpdateMaintenanceWindowRequestScheduleCustom) GetTimezone() string { + if o == nil || IsNil(o.Timezone) { + var ret string + return ret + } + return *o.Timezone +} + +// GetTimezoneOk returns a tuple with the Timezone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequestScheduleCustom) GetTimezoneOk() (*string, bool) { + if o == nil || IsNil(o.Timezone) { + return nil, false + } + return o.Timezone, true +} + +// HasTimezone returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindowRequestScheduleCustom) HasTimezone() bool { + if o != nil && !IsNil(o.Timezone) { + return true + } + + return false +} + +// SetTimezone gets a reference to the given string and assigns it to the Timezone field. +func (o *UpdateMaintenanceWindowRequestScheduleCustom) SetTimezone(v string) { + o.Timezone = &v +} + +func (o UpdateMaintenanceWindowRequestScheduleCustom) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateMaintenanceWindowRequestScheduleCustom) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["duration"] = o.Duration + if !IsNil(o.Recurring) { + toSerialize["recurring"] = o.Recurring + } + toSerialize["start"] = o.Start + if !IsNil(o.Timezone) { + toSerialize["timezone"] = o.Timezone + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateMaintenanceWindowRequestScheduleCustom) UnmarshalJSON(bytes []byte) (err error) { + varUpdateMaintenanceWindowRequestScheduleCustom := _UpdateMaintenanceWindowRequestScheduleCustom{} + + err = json.Unmarshal(bytes, &varUpdateMaintenanceWindowRequestScheduleCustom) + + if err != nil { + return err + } + + *o = UpdateMaintenanceWindowRequestScheduleCustom(varUpdateMaintenanceWindowRequestScheduleCustom) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "duration") + delete(additionalProperties, "recurring") + delete(additionalProperties, "start") + delete(additionalProperties, "timezone") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateMaintenanceWindowRequestScheduleCustom struct { + value *UpdateMaintenanceWindowRequestScheduleCustom + isSet bool +} + +func (v NullableUpdateMaintenanceWindowRequestScheduleCustom) Get() *UpdateMaintenanceWindowRequestScheduleCustom { + return v.value +} + +func (v *NullableUpdateMaintenanceWindowRequestScheduleCustom) Set(val *UpdateMaintenanceWindowRequestScheduleCustom) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateMaintenanceWindowRequestScheduleCustom) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateMaintenanceWindowRequestScheduleCustom) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateMaintenanceWindowRequestScheduleCustom(val *UpdateMaintenanceWindowRequestScheduleCustom) *NullableUpdateMaintenanceWindowRequestScheduleCustom { + return &NullableUpdateMaintenanceWindowRequestScheduleCustom{value: val, isSet: true} +} + +func (v NullableUpdateMaintenanceWindowRequestScheduleCustom) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateMaintenanceWindowRequestScheduleCustom) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_update_maintenance_window_request_schedule_custom_recurring.go b/generated/alerting/model_update_maintenance_window_request_schedule_custom_recurring.go new file mode 100644 index 000000000..1175c956a --- /dev/null +++ b/generated/alerting/model_update_maintenance_window_request_schedule_custom_recurring.go @@ -0,0 +1,347 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the UpdateMaintenanceWindowRequestScheduleCustomRecurring type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateMaintenanceWindowRequestScheduleCustomRecurring{} + +// UpdateMaintenanceWindowRequestScheduleCustomRecurring struct for UpdateMaintenanceWindowRequestScheduleCustomRecurring +type UpdateMaintenanceWindowRequestScheduleCustomRecurring struct { + // The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`. + End *string `json:"end,omitempty"` + // The interval and frequency of a recurring schedule. It allows values in `` format. `` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`. + Every *string `json:"every,omitempty"` + // The total number of recurrences of the schedule. + Occurrences *float32 `json:"occurrences,omitempty"` + // The specific months for a recurring schedule. Valid values are 1-12. + OnMonth interface{} `json:"onMonth,omitempty"` + // The specific days of the month for a recurring schedule. Valid values are 1-31. + OnMonthDay interface{} `json:"onMonthDay,omitempty"` + // The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule. + OnWeekDay interface{} `json:"onWeekDay,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateMaintenanceWindowRequestScheduleCustomRecurring UpdateMaintenanceWindowRequestScheduleCustomRecurring + +// NewUpdateMaintenanceWindowRequestScheduleCustomRecurring instantiates a new UpdateMaintenanceWindowRequestScheduleCustomRecurring object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateMaintenanceWindowRequestScheduleCustomRecurring() *UpdateMaintenanceWindowRequestScheduleCustomRecurring { + this := UpdateMaintenanceWindowRequestScheduleCustomRecurring{} + return &this +} + +// NewUpdateMaintenanceWindowRequestScheduleCustomRecurringWithDefaults instantiates a new UpdateMaintenanceWindowRequestScheduleCustomRecurring object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateMaintenanceWindowRequestScheduleCustomRecurringWithDefaults() *UpdateMaintenanceWindowRequestScheduleCustomRecurring { + this := UpdateMaintenanceWindowRequestScheduleCustomRecurring{} + return &this +} + +// GetEnd returns the End field value if set, zero value otherwise. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetEnd() string { + if o == nil || IsNil(o.End) { + var ret string + return ret + } + return *o.End +} + +// GetEndOk returns a tuple with the End field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetEndOk() (*string, bool) { + if o == nil || IsNil(o.End) { + return nil, false + } + return o.End, true +} + +// HasEnd returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) HasEnd() bool { + if o != nil && !IsNil(o.End) { + return true + } + + return false +} + +// SetEnd gets a reference to the given string and assigns it to the End field. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) SetEnd(v string) { + o.End = &v +} + +// GetEvery returns the Every field value if set, zero value otherwise. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetEvery() string { + if o == nil || IsNil(o.Every) { + var ret string + return ret + } + return *o.Every +} + +// GetEveryOk returns a tuple with the Every field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetEveryOk() (*string, bool) { + if o == nil || IsNil(o.Every) { + return nil, false + } + return o.Every, true +} + +// HasEvery returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) HasEvery() bool { + if o != nil && !IsNil(o.Every) { + return true + } + + return false +} + +// SetEvery gets a reference to the given string and assigns it to the Every field. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) SetEvery(v string) { + o.Every = &v +} + +// GetOccurrences returns the Occurrences field value if set, zero value otherwise. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetOccurrences() float32 { + if o == nil || IsNil(o.Occurrences) { + var ret float32 + return ret + } + return *o.Occurrences +} + +// GetOccurrencesOk returns a tuple with the Occurrences field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetOccurrencesOk() (*float32, bool) { + if o == nil || IsNil(o.Occurrences) { + return nil, false + } + return o.Occurrences, true +} + +// HasOccurrences returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) HasOccurrences() bool { + if o != nil && !IsNil(o.Occurrences) { + return true + } + + return false +} + +// SetOccurrences gets a reference to the given float32 and assigns it to the Occurrences field. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) SetOccurrences(v float32) { + o.Occurrences = &v +} + +// GetOnMonth returns the OnMonth field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonth() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.OnMonth +} + +// GetOnMonthOk returns a tuple with the OnMonth field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthOk() (*interface{}, bool) { + if o == nil || IsNil(o.OnMonth) { + return nil, false + } + return &o.OnMonth, true +} + +// HasOnMonth returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) HasOnMonth() bool { + if o != nil && IsNil(o.OnMonth) { + return true + } + + return false +} + +// SetOnMonth gets a reference to the given interface{} and assigns it to the OnMonth field. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) SetOnMonth(v interface{}) { + o.OnMonth = v +} + +// GetOnMonthDay returns the OnMonthDay field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthDay() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.OnMonthDay +} + +// GetOnMonthDayOk returns a tuple with the OnMonthDay field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetOnMonthDayOk() (*interface{}, bool) { + if o == nil || IsNil(o.OnMonthDay) { + return nil, false + } + return &o.OnMonthDay, true +} + +// HasOnMonthDay returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) HasOnMonthDay() bool { + if o != nil && IsNil(o.OnMonthDay) { + return true + } + + return false +} + +// SetOnMonthDay gets a reference to the given interface{} and assigns it to the OnMonthDay field. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) SetOnMonthDay(v interface{}) { + o.OnMonthDay = v +} + +// GetOnWeekDay returns the OnWeekDay field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetOnWeekDay() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.OnWeekDay +} + +// GetOnWeekDayOk returns a tuple with the OnWeekDay field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) GetOnWeekDayOk() (*interface{}, bool) { + if o == nil || IsNil(o.OnWeekDay) { + return nil, false + } + return &o.OnWeekDay, true +} + +// HasOnWeekDay returns a boolean if a field has been set. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) HasOnWeekDay() bool { + if o != nil && IsNil(o.OnWeekDay) { + return true + } + + return false +} + +// SetOnWeekDay gets a reference to the given interface{} and assigns it to the OnWeekDay field. +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) SetOnWeekDay(v interface{}) { + o.OnWeekDay = v +} + +func (o UpdateMaintenanceWindowRequestScheduleCustomRecurring) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateMaintenanceWindowRequestScheduleCustomRecurring) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.End) { + toSerialize["end"] = o.End + } + if !IsNil(o.Every) { + toSerialize["every"] = o.Every + } + if !IsNil(o.Occurrences) { + toSerialize["occurrences"] = o.Occurrences + } + if o.OnMonth != nil { + toSerialize["onMonth"] = o.OnMonth + } + if o.OnMonthDay != nil { + toSerialize["onMonthDay"] = o.OnMonthDay + } + if o.OnWeekDay != nil { + toSerialize["onWeekDay"] = o.OnWeekDay + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateMaintenanceWindowRequestScheduleCustomRecurring) UnmarshalJSON(bytes []byte) (err error) { + varUpdateMaintenanceWindowRequestScheduleCustomRecurring := _UpdateMaintenanceWindowRequestScheduleCustomRecurring{} + + err = json.Unmarshal(bytes, &varUpdateMaintenanceWindowRequestScheduleCustomRecurring) + + if err != nil { + return err + } + + *o = UpdateMaintenanceWindowRequestScheduleCustomRecurring(varUpdateMaintenanceWindowRequestScheduleCustomRecurring) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "end") + delete(additionalProperties, "every") + delete(additionalProperties, "occurrences") + delete(additionalProperties, "onMonth") + delete(additionalProperties, "onMonthDay") + delete(additionalProperties, "onWeekDay") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateMaintenanceWindowRequestScheduleCustomRecurring struct { + value *UpdateMaintenanceWindowRequestScheduleCustomRecurring + isSet bool +} + +func (v NullableUpdateMaintenanceWindowRequestScheduleCustomRecurring) Get() *UpdateMaintenanceWindowRequestScheduleCustomRecurring { + return v.value +} + +func (v *NullableUpdateMaintenanceWindowRequestScheduleCustomRecurring) Set(val *UpdateMaintenanceWindowRequestScheduleCustomRecurring) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateMaintenanceWindowRequestScheduleCustomRecurring) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateMaintenanceWindowRequestScheduleCustomRecurring) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateMaintenanceWindowRequestScheduleCustomRecurring(val *UpdateMaintenanceWindowRequestScheduleCustomRecurring) *NullableUpdateMaintenanceWindowRequestScheduleCustomRecurring { + return &NullableUpdateMaintenanceWindowRequestScheduleCustomRecurring{value: val, isSet: true} +} + +func (v NullableUpdateMaintenanceWindowRequestScheduleCustomRecurring) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateMaintenanceWindowRequestScheduleCustomRecurring) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_update_maintenance_window_request_scope.go b/generated/alerting/model_update_maintenance_window_request_scope.go new file mode 100644 index 000000000..90ed7d566 --- /dev/null +++ b/generated/alerting/model_update_maintenance_window_request_scope.go @@ -0,0 +1,144 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the UpdateMaintenanceWindowRequestScope type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateMaintenanceWindowRequestScope{} + +// UpdateMaintenanceWindowRequestScope struct for UpdateMaintenanceWindowRequestScope +type UpdateMaintenanceWindowRequestScope struct { + Alerting UpdateMaintenanceWindowRequestScopeAlerting `json:"alerting"` + AdditionalProperties map[string]interface{} +} + +type _UpdateMaintenanceWindowRequestScope UpdateMaintenanceWindowRequestScope + +// NewUpdateMaintenanceWindowRequestScope instantiates a new UpdateMaintenanceWindowRequestScope object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateMaintenanceWindowRequestScope(alerting UpdateMaintenanceWindowRequestScopeAlerting) *UpdateMaintenanceWindowRequestScope { + this := UpdateMaintenanceWindowRequestScope{} + this.Alerting = alerting + return &this +} + +// NewUpdateMaintenanceWindowRequestScopeWithDefaults instantiates a new UpdateMaintenanceWindowRequestScope object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateMaintenanceWindowRequestScopeWithDefaults() *UpdateMaintenanceWindowRequestScope { + this := UpdateMaintenanceWindowRequestScope{} + return &this +} + +// GetAlerting returns the Alerting field value +func (o *UpdateMaintenanceWindowRequestScope) GetAlerting() UpdateMaintenanceWindowRequestScopeAlerting { + if o == nil { + var ret UpdateMaintenanceWindowRequestScopeAlerting + return ret + } + + return o.Alerting +} + +// GetAlertingOk returns a tuple with the Alerting field value +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequestScope) GetAlertingOk() (*UpdateMaintenanceWindowRequestScopeAlerting, bool) { + if o == nil { + return nil, false + } + return &o.Alerting, true +} + +// SetAlerting sets field value +func (o *UpdateMaintenanceWindowRequestScope) SetAlerting(v UpdateMaintenanceWindowRequestScopeAlerting) { + o.Alerting = v +} + +func (o UpdateMaintenanceWindowRequestScope) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateMaintenanceWindowRequestScope) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["alerting"] = o.Alerting + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateMaintenanceWindowRequestScope) UnmarshalJSON(bytes []byte) (err error) { + varUpdateMaintenanceWindowRequestScope := _UpdateMaintenanceWindowRequestScope{} + + err = json.Unmarshal(bytes, &varUpdateMaintenanceWindowRequestScope) + + if err != nil { + return err + } + + *o = UpdateMaintenanceWindowRequestScope(varUpdateMaintenanceWindowRequestScope) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "alerting") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateMaintenanceWindowRequestScope struct { + value *UpdateMaintenanceWindowRequestScope + isSet bool +} + +func (v NullableUpdateMaintenanceWindowRequestScope) Get() *UpdateMaintenanceWindowRequestScope { + return v.value +} + +func (v *NullableUpdateMaintenanceWindowRequestScope) Set(val *UpdateMaintenanceWindowRequestScope) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateMaintenanceWindowRequestScope) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateMaintenanceWindowRequestScope) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateMaintenanceWindowRequestScope(val *UpdateMaintenanceWindowRequestScope) *NullableUpdateMaintenanceWindowRequestScope { + return &NullableUpdateMaintenanceWindowRequestScope{value: val, isSet: true} +} + +func (v NullableUpdateMaintenanceWindowRequestScope) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateMaintenanceWindowRequestScope) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_update_maintenance_window_request_scope_alerting.go b/generated/alerting/model_update_maintenance_window_request_scope_alerting.go new file mode 100644 index 000000000..a09fb7443 --- /dev/null +++ b/generated/alerting/model_update_maintenance_window_request_scope_alerting.go @@ -0,0 +1,144 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the UpdateMaintenanceWindowRequestScopeAlerting type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateMaintenanceWindowRequestScopeAlerting{} + +// UpdateMaintenanceWindowRequestScopeAlerting struct for UpdateMaintenanceWindowRequestScopeAlerting +type UpdateMaintenanceWindowRequestScopeAlerting struct { + Query UpdateMaintenanceWindowRequestScopeAlertingQuery `json:"query"` + AdditionalProperties map[string]interface{} +} + +type _UpdateMaintenanceWindowRequestScopeAlerting UpdateMaintenanceWindowRequestScopeAlerting + +// NewUpdateMaintenanceWindowRequestScopeAlerting instantiates a new UpdateMaintenanceWindowRequestScopeAlerting object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateMaintenanceWindowRequestScopeAlerting(query UpdateMaintenanceWindowRequestScopeAlertingQuery) *UpdateMaintenanceWindowRequestScopeAlerting { + this := UpdateMaintenanceWindowRequestScopeAlerting{} + this.Query = query + return &this +} + +// NewUpdateMaintenanceWindowRequestScopeAlertingWithDefaults instantiates a new UpdateMaintenanceWindowRequestScopeAlerting object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateMaintenanceWindowRequestScopeAlertingWithDefaults() *UpdateMaintenanceWindowRequestScopeAlerting { + this := UpdateMaintenanceWindowRequestScopeAlerting{} + return &this +} + +// GetQuery returns the Query field value +func (o *UpdateMaintenanceWindowRequestScopeAlerting) GetQuery() UpdateMaintenanceWindowRequestScopeAlertingQuery { + if o == nil { + var ret UpdateMaintenanceWindowRequestScopeAlertingQuery + return ret + } + + return o.Query +} + +// GetQueryOk returns a tuple with the Query field value +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequestScopeAlerting) GetQueryOk() (*UpdateMaintenanceWindowRequestScopeAlertingQuery, bool) { + if o == nil { + return nil, false + } + return &o.Query, true +} + +// SetQuery sets field value +func (o *UpdateMaintenanceWindowRequestScopeAlerting) SetQuery(v UpdateMaintenanceWindowRequestScopeAlertingQuery) { + o.Query = v +} + +func (o UpdateMaintenanceWindowRequestScopeAlerting) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateMaintenanceWindowRequestScopeAlerting) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["query"] = o.Query + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateMaintenanceWindowRequestScopeAlerting) UnmarshalJSON(bytes []byte) (err error) { + varUpdateMaintenanceWindowRequestScopeAlerting := _UpdateMaintenanceWindowRequestScopeAlerting{} + + err = json.Unmarshal(bytes, &varUpdateMaintenanceWindowRequestScopeAlerting) + + if err != nil { + return err + } + + *o = UpdateMaintenanceWindowRequestScopeAlerting(varUpdateMaintenanceWindowRequestScopeAlerting) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "query") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateMaintenanceWindowRequestScopeAlerting struct { + value *UpdateMaintenanceWindowRequestScopeAlerting + isSet bool +} + +func (v NullableUpdateMaintenanceWindowRequestScopeAlerting) Get() *UpdateMaintenanceWindowRequestScopeAlerting { + return v.value +} + +func (v *NullableUpdateMaintenanceWindowRequestScopeAlerting) Set(val *UpdateMaintenanceWindowRequestScopeAlerting) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateMaintenanceWindowRequestScopeAlerting) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateMaintenanceWindowRequestScopeAlerting) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateMaintenanceWindowRequestScopeAlerting(val *UpdateMaintenanceWindowRequestScopeAlerting) *NullableUpdateMaintenanceWindowRequestScopeAlerting { + return &NullableUpdateMaintenanceWindowRequestScopeAlerting{value: val, isSet: true} +} + +func (v NullableUpdateMaintenanceWindowRequestScopeAlerting) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateMaintenanceWindowRequestScopeAlerting) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/alerting/model_update_maintenance_window_request_scope_alerting_query.go b/generated/alerting/model_update_maintenance_window_request_scope_alerting_query.go new file mode 100644 index 000000000..047888b2c --- /dev/null +++ b/generated/alerting/model_update_maintenance_window_request_scope_alerting_query.go @@ -0,0 +1,145 @@ +/* +Alerting + +OpenAPI schema for alerting endpoints + +API version: 0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package alerting + +import ( + "encoding/json" +) + +// checks if the UpdateMaintenanceWindowRequestScopeAlertingQuery type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateMaintenanceWindowRequestScopeAlertingQuery{} + +// UpdateMaintenanceWindowRequestScopeAlertingQuery struct for UpdateMaintenanceWindowRequestScopeAlertingQuery +type UpdateMaintenanceWindowRequestScopeAlertingQuery struct { + // A filter written in Kibana Query Language (KQL). + Kql string `json:"kql"` + AdditionalProperties map[string]interface{} +} + +type _UpdateMaintenanceWindowRequestScopeAlertingQuery UpdateMaintenanceWindowRequestScopeAlertingQuery + +// NewUpdateMaintenanceWindowRequestScopeAlertingQuery instantiates a new UpdateMaintenanceWindowRequestScopeAlertingQuery object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateMaintenanceWindowRequestScopeAlertingQuery(kql string) *UpdateMaintenanceWindowRequestScopeAlertingQuery { + this := UpdateMaintenanceWindowRequestScopeAlertingQuery{} + this.Kql = kql + return &this +} + +// NewUpdateMaintenanceWindowRequestScopeAlertingQueryWithDefaults instantiates a new UpdateMaintenanceWindowRequestScopeAlertingQuery object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateMaintenanceWindowRequestScopeAlertingQueryWithDefaults() *UpdateMaintenanceWindowRequestScopeAlertingQuery { + this := UpdateMaintenanceWindowRequestScopeAlertingQuery{} + return &this +} + +// GetKql returns the Kql field value +func (o *UpdateMaintenanceWindowRequestScopeAlertingQuery) GetKql() string { + if o == nil { + var ret string + return ret + } + + return o.Kql +} + +// GetKqlOk returns a tuple with the Kql field value +// and a boolean to check if the value has been set. +func (o *UpdateMaintenanceWindowRequestScopeAlertingQuery) GetKqlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kql, true +} + +// SetKql sets field value +func (o *UpdateMaintenanceWindowRequestScopeAlertingQuery) SetKql(v string) { + o.Kql = v +} + +func (o UpdateMaintenanceWindowRequestScopeAlertingQuery) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateMaintenanceWindowRequestScopeAlertingQuery) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["kql"] = o.Kql + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateMaintenanceWindowRequestScopeAlertingQuery) UnmarshalJSON(bytes []byte) (err error) { + varUpdateMaintenanceWindowRequestScopeAlertingQuery := _UpdateMaintenanceWindowRequestScopeAlertingQuery{} + + err = json.Unmarshal(bytes, &varUpdateMaintenanceWindowRequestScopeAlertingQuery) + + if err != nil { + return err + } + + *o = UpdateMaintenanceWindowRequestScopeAlertingQuery(varUpdateMaintenanceWindowRequestScopeAlertingQuery) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "kql") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateMaintenanceWindowRequestScopeAlertingQuery struct { + value *UpdateMaintenanceWindowRequestScopeAlertingQuery + isSet bool +} + +func (v NullableUpdateMaintenanceWindowRequestScopeAlertingQuery) Get() *UpdateMaintenanceWindowRequestScopeAlertingQuery { + return v.value +} + +func (v *NullableUpdateMaintenanceWindowRequestScopeAlertingQuery) Set(val *UpdateMaintenanceWindowRequestScopeAlertingQuery) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateMaintenanceWindowRequestScopeAlertingQuery) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateMaintenanceWindowRequestScopeAlertingQuery) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateMaintenanceWindowRequestScopeAlertingQuery(val *UpdateMaintenanceWindowRequestScopeAlertingQuery) *NullableUpdateMaintenanceWindowRequestScopeAlertingQuery { + return &NullableUpdateMaintenanceWindowRequestScopeAlertingQuery{value: val, isSet: true} +} + +func (v NullableUpdateMaintenanceWindowRequestScopeAlertingQuery) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateMaintenanceWindowRequestScopeAlertingQuery) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/clients/kibana/alerting.go b/internal/clients/kibana/alerting.go index fc87bed85..d5cd1fbb5 100644 --- a/internal/clients/kibana/alerting.go +++ b/internal/clients/kibana/alerting.go @@ -110,7 +110,7 @@ func ruleActionsToActionsInner(ruleActions []models.AlertingRuleAction) []alerti if !alerting.IsNil(action.Frequency) { frequency := alerting.ActionsInnerFrequency{ Summary: action.Frequency.Summary, - NotifyWhen: (alerting.NotifyWhen)(action.Frequency.NotifyWhen), + NotifyWhen: (alerting.NotifyWhenAction)(action.Frequency.NotifyWhen), } if action.Frequency.Throttle != nil { diff --git a/internal/clients/kibana/maintenance_window.go b/internal/clients/kibana/maintenance_window.go new file mode 100644 index 000000000..5b1c30975 --- /dev/null +++ b/internal/clients/kibana/maintenance_window.go @@ -0,0 +1,269 @@ +package kibana + +import ( + "context" + "fmt" + "net/http" + + "github.com/elastic/terraform-provider-elasticstack/generated/alerting" + "github.com/elastic/terraform-provider-elasticstack/internal/clients" + "github.com/elastic/terraform-provider-elasticstack/internal/models" + "github.com/elastic/terraform-provider-elasticstack/internal/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" +) + +func maintenanceWindowResponseToModel(spaceId string, res *alerting.MaintenanceWindowResponseProperties) *models.MaintenanceWindow { + if res == nil { + return nil + } + + var recurring *models.MaintenanceWindowScheduleRecurring + + if alerting.IsNil(res.Schedule.Custom.Recurring) { + recurring = nil + } else { + unwrappedRecurring := unwrapOptionalField(res.Schedule.Custom.Recurring) + + recurring = &models.MaintenanceWindowScheduleRecurring{ + End: unwrappedRecurring.End, + Every: unwrappedRecurring.Every, + OnWeekDay: &unwrappedRecurring.OnWeekDay, + OnMonthDay: &unwrappedRecurring.OnMonthDay, + OnMonth: &unwrappedRecurring.OnMonth, + } + } + + var scope *models.MaintenanceWindowScope + + if alerting.IsNil(res.Scope) { + scope = nil + } else { + unwrappedScope := unwrapOptionalField(res.Scope) + + scope = &models.MaintenanceWindowScope{ + Alerting: &models.MaintenanceWindowAlertingScope{ + Kql: unwrappedScope.Alerting.Query.Kql, + }, + } + } + + return &models.MaintenanceWindow{ + MaintenanceWindowId: res.Id, + SpaceId: spaceId, + Title: res.Title, + Enabled: res.Enabled, + CustomSchedule: models.MaintenanceWindowSchedule{ + Start: res.Schedule.Custom.Start, + Duration: res.Schedule.Custom.Duration, + Timezone: res.Schedule.Custom.Timezone, + Recurring: recurring, + }, + Scope: scope, + } +} + +func CreateMaintenanceWindow(ctx context.Context, apiClient ApiClient, maintenanceWindow models.MaintenanceWindow) (*models.MaintenanceWindow, diag.Diagnostics) { + client, err := apiClient.GetAlertingClient() + if err != nil { + return nil, diag.FromErr(err) + } + + ctxWithAuth := apiClient.SetAlertingAuthContext(ctx) + + schedule := alerting.CreateMaintenanceWindowRequestSchedule{ + Custom: alerting.CreateMaintenanceWindowRequestScheduleCustom{ + Start: maintenanceWindow.CustomSchedule.Start, + Duration: maintenanceWindow.CustomSchedule.Duration, + Timezone: maintenanceWindow.CustomSchedule.Timezone, + }, + } + + var recurring *alerting.CreateMaintenanceWindowRequestScheduleCustomRecurring + + if alerting.IsNil(maintenanceWindow.CustomSchedule.Recurring) { + recurring = nil + } else { + unwrappedRecurring := unwrapOptionalField(maintenanceWindow.CustomSchedule.Recurring) + unwrappedOnWeekDay := unwrapOptionalField(unwrappedRecurring.OnWeekDay) + unwrappedOnMonthDay := unwrapOptionalField(unwrappedRecurring.OnMonthDay) + unwrappedOnMonth := unwrapOptionalField(unwrappedRecurring.OnMonth) + + recurring = &alerting.CreateMaintenanceWindowRequestScheduleCustomRecurring{ + End: unwrappedRecurring.End, + Every: unwrappedRecurring.Every, + OnWeekDay: unwrappedOnWeekDay, + OnMonthDay: unwrappedOnMonthDay, + OnMonth: unwrappedOnMonth, + } + } + + schedule.Custom.Recurring = recurring + + var scope *alerting.CreateMaintenanceWindowRequestScope + + if alerting.IsNil(maintenanceWindow.Scope) { + scope = nil + } else { + scope = &alerting.CreateMaintenanceWindowRequestScope{ + Alerting: alerting.CreateMaintenanceWindowRequestScopeAlerting{ + Query: alerting.CreateMaintenanceWindowRequestScopeAlertingQuery{ + Kql: maintenanceWindow.Scope.Alerting.Kql, + }, + }, + } + } + + reqModel := alerting.CreateMaintenanceWindowRequest{ + Title: maintenanceWindow.Title, + Enabled: &maintenanceWindow.Enabled, + Schedule: schedule, + Scope: scope, + } + + req := client.CreateMaintenanceWindow(ctxWithAuth, maintenanceWindow.SpaceId).KbnXsrf("true").CreateMaintenanceWindowRequest(reqModel) + maintenanceWindowRes, res, err := req.Execute() + if err != nil && res == nil { + return nil, diag.FromErr(err) + } + + defer res.Body.Close() + + diags := utils.CheckHttpError(res, "Unable to create maintenance window") + if diags.HasError() { + return nil, diags + } + + if maintenanceWindowRes == nil { + return nil, diag.Diagnostics{diag.Diagnostic{ + Severity: diag.Error, + Summary: "Create maintenance window returned an empty response", + Detail: fmt.Sprintf("Create maintenance window returned an empty response with HTTP status code [%d].", res.StatusCode), + }} + } + + return maintenanceWindowResponseToModel(maintenanceWindow.SpaceId, maintenanceWindowRes), nil +} + +func GetMaintenanceWindow(ctx context.Context, apiClient *clients.ApiClient, maintenanceWindowId string, spaceId string) (*models.MaintenanceWindow, diag.Diagnostics) { + client, err := apiClient.GetAlertingClient() + if err != nil { + return nil, diag.FromErr(err) + } + + ctxWithAuth := apiClient.SetAlertingAuthContext(ctx) + + req := client.GetMaintenanceWindow(ctxWithAuth, maintenanceWindowId, spaceId) + maintenanceWindowRes, res, err := req.Execute() + + if err != nil && res == nil { + return nil, diag.FromErr(err) + } + + defer res.Body.Close() + if res.StatusCode == http.StatusNotFound { + return nil, nil + } + + return maintenanceWindowResponseToModel(spaceId, maintenanceWindowRes), utils.CheckHttpError(res, "Unable to get maintenance window") +} + +func DeleteMaintenanceWindow(ctx context.Context, apiClient *clients.ApiClient, maintenanceWindowId string, spaceId string) diag.Diagnostics { + client, err := apiClient.GetAlertingClient() + if err != nil { + return diag.FromErr(err) + } + + ctxWithAuth := apiClient.SetAlertingAuthContext(ctx) + + req := client.DeleteMaintenanceWindow(ctxWithAuth, maintenanceWindowId, spaceId).KbnXsrf("true") + res, err := req.Execute() + if err != nil && res == nil { + return diag.FromErr(err) + } + + defer res.Body.Close() + return utils.CheckHttpError(res, "Unable to delete maintenance window") +} + +func UpdateMaintenanceWindow(ctx context.Context, apiClient ApiClient, maintenanceWindow models.MaintenanceWindow) (*models.MaintenanceWindow, diag.Diagnostics) { + client, err := apiClient.GetAlertingClient() + if err != nil { + return nil, diag.FromErr(err) + } + + ctxWithAuth := apiClient.SetAlertingAuthContext(ctx) + + schedule := alerting.CreateMaintenanceWindowRequestSchedule{ + Custom: alerting.CreateMaintenanceWindowRequestScheduleCustom{ + Start: maintenanceWindow.CustomSchedule.Start, + Duration: maintenanceWindow.CustomSchedule.Duration, + Timezone: maintenanceWindow.CustomSchedule.Timezone, + }, + } + + var recurring *alerting.CreateMaintenanceWindowRequestScheduleCustomRecurring + + if alerting.IsNil(maintenanceWindow.CustomSchedule.Recurring) { + recurring = nil + } else { + unwrappedRecurring := unwrapOptionalField(maintenanceWindow.CustomSchedule.Recurring) + unwrappedOnWeekDay := unwrapOptionalField(unwrappedRecurring.OnWeekDay) + unwrappedOnMonthDay := unwrapOptionalField(unwrappedRecurring.OnMonthDay) + unwrappedOnMonth := unwrapOptionalField(unwrappedRecurring.OnMonth) + + recurring = &alerting.CreateMaintenanceWindowRequestScheduleCustomRecurring{ + End: unwrappedRecurring.End, + Every: unwrappedRecurring.Every, + OnWeekDay: unwrappedOnWeekDay, + OnMonthDay: unwrappedOnMonthDay, + OnMonth: unwrappedOnMonth, + } + } + + schedule.Custom.Recurring = recurring + + var scope *alerting.CreateMaintenanceWindowRequestScope + + if alerting.IsNil(maintenanceWindow.Scope) { + scope = nil + } else { + scope = &alerting.CreateMaintenanceWindowRequestScope{ + Alerting: alerting.CreateMaintenanceWindowRequestScopeAlerting{ + Query: alerting.CreateMaintenanceWindowRequestScopeAlertingQuery{ + Kql: maintenanceWindow.Scope.Alerting.Kql, + }, + }, + } + } + + reqModel := alerting.UpdateMaintenanceWindowRequest{ + Title: &maintenanceWindow.Title, + Enabled: &maintenanceWindow.Enabled, + Schedule: &schedule, + Scope: scope, + } + + req := client.UpdateMaintenanceWindow(ctxWithAuth, maintenanceWindow.MaintenanceWindowId, maintenanceWindow.SpaceId).KbnXsrf("true").UpdateMaintenanceWindowRequest(reqModel) + + maintenanceWindowRes, res, err := req.Execute() + if err != nil && res == nil { + return nil, diag.FromErr(err) + } + + defer res.Body.Close() + + if diags := utils.CheckHttpError(res, "Unable to update maintenance window"); diags.HasError() { + return nil, diags + } + + if maintenanceWindowRes == nil { + return nil, diag.Diagnostics{diag.Diagnostic{ + Severity: diag.Error, + Summary: "Update maintenance window returned an empty response", + Detail: fmt.Sprintf("Update maintenance window returned an empty response with HTTP status code [%d].", res.StatusCode), + }} + } + + return maintenanceWindowResponseToModel(maintenanceWindow.SpaceId, maintenanceWindowRes), nil +} diff --git a/internal/clients/kibana/maintenance_window_test.go b/internal/clients/kibana/maintenance_window_test.go new file mode 100644 index 000000000..9eb645831 --- /dev/null +++ b/internal/clients/kibana/maintenance_window_test.go @@ -0,0 +1,253 @@ +package kibana + +import ( + "context" + "fmt" + "io" + "net/http" + "strings" + "testing" + + "github.com/elastic/terraform-provider-elasticstack/generated/alerting" + "github.com/elastic/terraform-provider-elasticstack/internal/models" + "github.com/elastic/terraform-provider-elasticstack/internal/utils" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/stretchr/testify/require" + gomock "go.uber.org/mock/gomock" +) + +func Test_maintenanceWindowResponseToModel(t *testing.T) { + tests := []struct { + name string + spaceId string + maintenanceWindowResponse *alerting.MaintenanceWindowResponseProperties + expectedModel *models.MaintenanceWindow + }{ + { + name: "nil response should return a nil model", + spaceId: "space-id", + maintenanceWindowResponse: nil, + expectedModel: nil, + }, + { + name: "nil optional fields should not blow up the transform", + spaceId: "space-id", + maintenanceWindowResponse: &alerting.MaintenanceWindowResponseProperties{ + Id: "some-long-id", + CreatedBy: "me", + CreatedAt: "today", + UpdatedBy: "me", + UpdatedAt: "today", + Enabled: true, + Status: "running", + Title: "maintenance-window-id", + Schedule: alerting.MaintenanceWindowResponsePropertiesSchedule{ + Custom: alerting.MaintenanceWindowResponsePropertiesScheduleCustom{ + Duration: "12d", + Start: "1999-02-02T05:00:00.200Z", + Recurring: nil, + Timezone: nil, + }, + }, + Scope: nil, + }, + expectedModel: &models.MaintenanceWindow{ + MaintenanceWindowId: "some-long-id", + SpaceId: "space-id", + Title: "maintenance-window-id", + Enabled: true, + CustomSchedule: models.MaintenanceWindowSchedule{ + Duration: "12d", + Start: "1999-02-02T05:00:00.200Z", + }, + }, + }, + { + name: "a full response should be successfully transformed", + spaceId: "space-id", + maintenanceWindowResponse: &alerting.MaintenanceWindowResponseProperties{ + Id: "maintenance-window-id", + Title: "maintenance-window-title", + CreatedBy: "me", + CreatedAt: "today", + UpdatedBy: "me", + UpdatedAt: "today", + Enabled: true, + Status: "running", + Schedule: alerting.MaintenanceWindowResponsePropertiesSchedule{ + Custom: alerting.MaintenanceWindowResponsePropertiesScheduleCustom{ + Duration: "12d", + Start: "1999-02-02T05:00:00.200Z", + Timezone: utils.Pointer("Asia/Taipei"), + Recurring: &alerting.MaintenanceWindowResponsePropertiesScheduleCustomRecurring{ + End: utils.Pointer("2029-05-17T05:05:00.000Z"), + Every: utils.Pointer("20d"), + OnMonth: []float32{2}, + OnMonthDay: []float32{1}, + OnWeekDay: []string{"WE", "TU"}, + }, + }, + }, + Scope: &alerting.MaintenanceWindowResponsePropertiesScope{ + Alerting: alerting.MaintenanceWindowResponsePropertiesScopeAlerting{ + Query: alerting.MaintenanceWindowResponsePropertiesScopeAlertingQuery{ + Kql: "_id: 'foobar'", + }, + }, + }, + }, + expectedModel: &models.MaintenanceWindow{ + MaintenanceWindowId: "maintenance-window-id", + Title: "maintenance-window-title", + SpaceId: "space-id", + Enabled: true, + CustomSchedule: models.MaintenanceWindowSchedule{ + Duration: "12d", + Start: "1999-02-02T05:00:00.200Z", + Timezone: utils.Pointer("Asia/Taipei"), + Recurring: &models.MaintenanceWindowScheduleRecurring{ + End: utils.Pointer("2029-05-17T05:05:00.000Z"), + Every: utils.Pointer("20d"), + OnMonth: &[]float32{2}, + OnMonthDay: &[]float32{1}, + OnWeekDay: &[]string{"WE", "TU"}, + }, + }, + Scope: &models.MaintenanceWindowScope{ + Alerting: &models.MaintenanceWindowAlertingScope{ + Kql: "_id: 'foobar'", + }, + }, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + model := maintenanceWindowResponseToModel(tt.spaceId, tt.maintenanceWindowResponse) + + require.Equal(t, tt.expectedModel, model) + }) + } +} + +func Test_CreateUpdateMaintenanceWindow(t *testing.T) { + ctrl := gomock.NewController(t) + + getApiClient := func() (ApiClient, *alerting.MockAlertingAPI) { + apiClient := NewMockApiClient(ctrl) + apiClient.EXPECT().SetAlertingAuthContext(gomock.Any()).DoAndReturn(func(ctx context.Context) context.Context { return ctx }) + alertingClient := alerting.NewMockAlertingAPI(ctrl) + apiClient.EXPECT().GetAlertingClient().DoAndReturn(func() (alerting.AlertingAPI, error) { return alertingClient, nil }) + return apiClient, alertingClient + } + + tests := []struct { + name string + testFunc func(ctx context.Context, apiClient ApiClient, maintenanceWindow models.MaintenanceWindow) (*models.MaintenanceWindow, diag.Diagnostics) + client ApiClient + maintenanceWindow models.MaintenanceWindow + expectedRes *models.MaintenanceWindow + expectedErr string + }{ + { + name: "CreateMaintenanceWindow should not crash when backend returns 4xx", + testFunc: CreateMaintenanceWindow, + client: func() ApiClient { + apiClient, alertingClient := getApiClient() + alertingClient.EXPECT().CreateMaintenanceWindow(gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, spaceId string) alerting.ApiCreateMaintenanceWindowRequest { + return alerting.ApiCreateMaintenanceWindowRequest{ApiService: alertingClient} + }) + alertingClient.EXPECT().CreateMaintenanceWindowExecute(gomock.Any()).DoAndReturn(func(r alerting.ApiCreateMaintenanceWindowRequest) (*alerting.MaintenanceWindowResponseProperties, *http.Response, error) { + return nil, &http.Response{ + StatusCode: 401, + Body: io.NopCloser(strings.NewReader("some error")), + }, nil + }) + return apiClient + }(), + maintenanceWindow: models.MaintenanceWindow{}, + expectedRes: nil, + expectedErr: "some error", + }, + { + name: "UpdateMaintenanceWindow should not crash when backend returns 4xx", + testFunc: UpdateMaintenanceWindow, + client: func() ApiClient { + apiClient, alertingClient := getApiClient() + alertingClient.EXPECT().UpdateMaintenanceWindow(gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, maintenanceWindowId string, spaceId string) alerting.ApiUpdateMaintenanceWindowRequest { + return alerting.ApiUpdateMaintenanceWindowRequest{ApiService: alertingClient} + }) + alertingClient.EXPECT().UpdateMaintenanceWindowExecute(gomock.Any()).DoAndReturn(func(r alerting.ApiUpdateMaintenanceWindowRequest) (*alerting.MaintenanceWindowResponseProperties, *http.Response, error) { + return nil, &http.Response{ + StatusCode: 401, + Body: io.NopCloser(strings.NewReader("some error")), + }, nil + }) + return apiClient + }(), + maintenanceWindow: models.MaintenanceWindow{}, + expectedRes: nil, + expectedErr: "some error", + }, + { + name: "CreateMaintenanceWindow should not crash when backend returns an empty response and HTTP 200", + testFunc: CreateMaintenanceWindow, + client: func() ApiClient { + apiClient, alertingClient := getApiClient() + alertingClient.EXPECT().CreateMaintenanceWindow(gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, spaceId string) alerting.ApiCreateMaintenanceWindowRequest { + return alerting.ApiCreateMaintenanceWindowRequest{ApiService: alertingClient} + }) + alertingClient.EXPECT().CreateMaintenanceWindowExecute(gomock.Any()).DoAndReturn(func(r alerting.ApiCreateMaintenanceWindowRequest) (*alerting.MaintenanceWindowResponseProperties, *http.Response, error) { + return nil, &http.Response{ + StatusCode: 200, + Body: io.NopCloser(strings.NewReader("everything seems fine")), + }, nil + }) + return apiClient + }(), + maintenanceWindow: models.MaintenanceWindow{}, + expectedRes: nil, + expectedErr: "empty response", + }, + { + name: "UpdateMaintenanceWindow should not crash when backend returns an empty response and HTTP 200", + testFunc: UpdateMaintenanceWindow, + client: func() ApiClient { + apiClient, alertingClient := getApiClient() + alertingClient.EXPECT().UpdateMaintenanceWindow(gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, maintenanceWindowId string, spaceId string) alerting.ApiUpdateMaintenanceWindowRequest { + return alerting.ApiUpdateMaintenanceWindowRequest{ApiService: alertingClient} + }) + alertingClient.EXPECT().UpdateMaintenanceWindowExecute(gomock.Any()).DoAndReturn(func(r alerting.ApiUpdateMaintenanceWindowRequest) (*alerting.MaintenanceWindowResponseProperties, *http.Response, error) { + return nil, &http.Response{ + StatusCode: 200, + Body: io.NopCloser(strings.NewReader("everything seems fine")), + }, nil + }) + return apiClient + }(), + maintenanceWindow: models.MaintenanceWindow{}, + expectedRes: nil, + expectedErr: "empty response", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + maintenanceWindow, diags := tt.testFunc(context.Background(), tt.client, tt.maintenanceWindow) + + if tt.expectedRes == nil { + require.Nil(t, maintenanceWindow) + } else { + require.Equal(t, tt.expectedRes, maintenanceWindow) + } + + if tt.expectedErr != "" { + require.NotEmpty(t, diags) + if !strings.Contains(diags[0].Detail, tt.expectedErr) { + require.Fail(t, fmt.Sprintf("Diags ['%s'] should contain message ['%s']", diags[0].Detail, tt.expectedErr)) + } + } + }) + } +} diff --git a/internal/kibana/alerting.go b/internal/kibana/alerting.go index ab1b83960..9d1ccec84 100644 --- a/internal/kibana/alerting.go +++ b/internal/kibana/alerting.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" "fmt" - "regexp" "strings" "github.com/elastic/terraform-provider-elasticstack/internal/clients" @@ -22,14 +21,6 @@ var frequencyMinSupportedVersion = version.Must(version.NewVersion("8.6.0")) var alertsFilterMinSupportedVersion = version.Must(version.NewVersion("8.9.0")) var alertDelayMinSupportedVersion = version.Must(version.NewVersion("8.13.0")) -// Avoid lint error on deprecated SchemaValidateFunc usage. -// -//nolint:staticcheck -func stringIsAlertingDuration() schema.SchemaValidateFunc { - r := regexp.MustCompile(`^[1-9][0-9]*(?:d|h|m|s)$`) - return validation.StringMatch(r, "string is not a valid Alerting duration in seconds (s), minutes (m), hours (h), or days (d)") -} - func ResourceAlertingRule() *schema.Resource { apikeySchema := map[string]*schema.Schema{ "rule_id": { @@ -80,7 +71,7 @@ func ResourceAlertingRule() *schema.Resource { Description: "The check interval, which specifies how frequently the rule conditions are checked. The interval must be specified in seconds, minutes, hours or days.", Type: schema.TypeString, Required: true, - ValidateFunc: stringIsAlertingDuration(), + ValidateFunc: utils.StringIsAlertingDuration(), }, "actions": { Description: "An action that runs under defined conditions.", @@ -129,7 +120,7 @@ func ResourceAlertingRule() *schema.Resource { Description: "Defines how often an alert generates repeated actions. This custom action interval must be specified in seconds, minutes, hours, or days. For example, 10m or 1h. This property is applicable only if `notify_when` is `onThrottleInterval`. NOTE: This is a rule level property; if you update the rule in Kibana, it is automatically changed to use action-specific `throttle` values.", Type: schema.TypeString, Optional: true, - ValidateFunc: stringIsAlertingDuration(), + ValidateFunc: utils.StringIsAlertingDuration(), }, }, }, @@ -207,7 +198,7 @@ func ResourceAlertingRule() *schema.Resource { Description: "Deprecated in 8.13.0. Defines how often an alert generates repeated actions. This custom action interval must be specified in seconds, minutes, hours, or days. For example, 10m or 1h. This property is applicable only if `notify_when` is `onThrottleInterval`. NOTE: This is a rule level property; if you update the rule in Kibana, it is automatically changed to use action-specific `throttle` values.", Type: schema.TypeString, Optional: true, - ValidateFunc: stringIsAlertingDuration(), + ValidateFunc: utils.StringIsAlertingDuration(), }, "scheduled_task_id": { Description: "ID of the scheduled task that will execute the alert.", diff --git a/internal/kibana/maintenance_window.go b/internal/kibana/maintenance_window.go new file mode 100644 index 000000000..09a528fa2 --- /dev/null +++ b/internal/kibana/maintenance_window.go @@ -0,0 +1,464 @@ +package kibana + +import ( + "context" + "fmt" + + "github.com/elastic/terraform-provider-elasticstack/internal/clients" + "github.com/elastic/terraform-provider-elasticstack/internal/clients/kibana" + "github.com/elastic/terraform-provider-elasticstack/internal/models" + "github.com/elastic/terraform-provider-elasticstack/internal/utils" + "github.com/hashicorp/go-version" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" +) + +func validateMaintenanceWindowServer(serverVersion *version.Version, serverFlavor string) diag.Diagnostics { + var serverlessFlavor = "serverless" + var maintenanceWindowPublicAPIMinSupportedVersion = version.Must(version.NewVersion("9.1.0")) + var diags diag.Diagnostics + + if serverVersion.LessThan(maintenanceWindowPublicAPIMinSupportedVersion) && serverFlavor != serverlessFlavor { + diags = append(diags, diag.Diagnostic{ + Severity: diag.Error, + Summary: "Maintenance window API not supported", + Detail: fmt.Sprintf(`The maintenance Window public API feature requires a minimum Elasticsearch version of "%s" or a serverless Kibana instance.`, maintenanceWindowPublicAPIMinSupportedVersion), + }) + return diags + } + return nil +} + +func ResourceMaintenanceWindow() *schema.Resource { + apikeySchema := map[string]*schema.Schema{ + "space_id": { + Description: "An identifier for the space. If space_id is not provided, the default space is used.", + Type: schema.TypeString, + Optional: true, + Default: "default", + ForceNew: true, + }, + "title": { + Description: "The name of the maintenance window.", + Type: schema.TypeString, + Required: true, + }, + "enabled": { + Description: "Whether the current maintenance window is enabled.", + Type: schema.TypeBool, + Optional: true, + }, + "custom_schedule": { + Description: "A set schedule over which the maintenance window applies.", + Type: schema.TypeList, + MaxItems: 1, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "start": { + Description: "The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.", + Type: schema.TypeString, + Required: true, + }, + "duration": { + Description: "The duration of the schedule. It allows values in `` format. `` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.", + Type: schema.TypeString, + Required: true, + ValidateFunc: utils.StringIsAlertingDuration(), + }, + "timezone": { + Description: "The timezone of the schedule. The default timezone is UTC.", + Type: schema.TypeString, + Optional: true, + }, + "recurring": { + Type: schema.TypeList, + MinItems: 0, + MaxItems: 1, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "end": { + Description: "The end date of a recurring schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-04-01T00:00:00.000Z`.", + Type: schema.TypeString, + Optional: true, + }, + "every": { + Description: "The interval and frequency of a recurring schedule. It allows values in `` format. `` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.", + Type: schema.TypeString, + Optional: true, + ValidateFunc: utils.StringIsMaintenanceWindowIntervalFrequency(), + }, + "on_week_day": { + Description: "The specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`) for a recurring schedule.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: utils.StringIsMaintenanceWindowOnWeekDay(), + }, + }, + "on_month_day": { + Description: "The specific days of the month for a recurring schedule. Valid values are 1-31.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeInt, + ValidateFunc: validation.IntBetween(1, 31), + }, + }, + "on_month": { + Description: "The specific months for a recurring schedule. Valid values are 1-12.", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeInt, + ValidateFunc: validation.IntBetween(1, 12), + }, + }, + }, + }, + }, + }, + }, + }, + "scope": { + Description: "An object that narrows the scope of what is affected by this maintenance window.", + Type: schema.TypeList, + MinItems: 0, + MaxItems: 1, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "alerting": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "kql": { + Description: "A filter written in Kibana Query Language (KQL).", + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + }, + }, + }, + } + + return &schema.Resource{ + Description: "Creates a Kibana Maintenance Window.", + + CreateContext: resourceMaintenanceWindowCreate, + UpdateContext: resourceMaintenanceWindowUpdate, + ReadContext: resourceMaintenanceWindowRead, + DeleteContext: resourceMaintenanceWindowDelete, + + Importer: &schema.ResourceImporter{ + StateContext: schema.ImportStatePassthroughContext, + }, + + Schema: apikeySchema, + } +} + +func getMaintenanceWindowFromResourceData(d *schema.ResourceData) (models.MaintenanceWindow, diag.Diagnostics) { + var diags diag.Diagnostics + maintenanceWindow := models.MaintenanceWindow{ + SpaceId: d.Get("space_id").(string), + Title: d.Get("title").(string), + Enabled: d.Get("enabled").(bool), + } + + if _, ok := d.GetOk("scope.alerting"); ok { + + alerting := &models.MaintenanceWindowAlertingScope{ + Kql: d.Get("scope.alerting.kql").(string), + } + + maintenanceWindow.Scope = &models.MaintenanceWindowScope{ + Alerting: alerting, + } + } + + schedule, diags := getScheduleFromResourceData(d) + + if diags.HasError() { + return models.MaintenanceWindow{}, diags + } + + maintenanceWindow.CustomSchedule = schedule + + return maintenanceWindow, diags +} + +func getScheduleFromResourceData(d *schema.ResourceData) (models.MaintenanceWindowSchedule, diag.Diagnostics) { + schedule := models.MaintenanceWindowSchedule{ + Start: d.Get("custom_schedule.0.start").(string), + Duration: d.Get("custom_schedule.0.duration").(string), + } + + // Explicitly set timezone if provided + if timezone := getOrNilString("custom_schedule.0.timezone", d); timezone != nil && *timezone != "" { + schedule.Timezone = timezone + } + + if _, ok := d.GetOk("custom_schedule.0.recurring"); ok { + recurring := models.MaintenanceWindowScheduleRecurring{} + + if v, ok := d.GetOk("custom_schedule.0.recurring.0.end"); ok { + end := v.(string) + recurring.End = &end + } + + if v, ok := d.GetOk("custom_schedule.0.recurring.0.every"); ok { + every := v.(string) + recurring.Every = &every + } + + if onWeekDay, ok := d.GetOk("custom_schedule.0.recurring.0.on_week_day"); ok { + weekDayArray := []string{} + for _, weekDay := range onWeekDay.([]interface{}) { + weekDayArray = append(weekDayArray, weekDay.(string)) + } + recurring.OnWeekDay = &weekDayArray + } + + if onMonthDay, ok := d.GetOk("custom_schedule.0.recurring.0.on_month_day"); ok { + monthDayArray := []float32{} + for _, monthDay := range onMonthDay.([]interface{}) { + monthDayArray = append(monthDayArray, float32(monthDay.(int))) + } + recurring.OnMonthDay = &monthDayArray + } + + if onMonth, ok := d.GetOk("custom_schedule.0.recurring.0.on_month"); ok { + monthArray := []float32{} + for _, month := range onMonth.([]interface{}) { + monthArray = append(monthArray, float32(month.(int))) + } + recurring.OnMonth = &monthArray + + } + + schedule.Recurring = &recurring + } + + return schedule, nil +} + +func resourceMaintenanceWindowCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + client, diags := clients.NewApiClientFromSDKResource(d, meta) + if diags.HasError() { + return diags + } + + serverVersion, diags := client.ServerVersion(ctx) + if diags.HasError() { + return diags + } + + serverFlavor, diags := client.ServerFlavor(ctx) + if diags.HasError() { + return diags + } + + diags = validateMaintenanceWindowServer(serverVersion, serverFlavor) + if diags.HasError() { + return diags + } + + maintenanceWindow, diags := getMaintenanceWindowFromResourceData(d) + + if diags.HasError() { + return diags + } + + res, diags := kibana.CreateMaintenanceWindow(ctx, client, maintenanceWindow) + + if diags.HasError() { + return diags + } + + compositeID := &clients.CompositeId{ClusterId: res.SpaceId, ResourceId: res.MaintenanceWindowId} + d.SetId(compositeID.String()) + + return resourceMaintenanceWindowRead(ctx, d, meta) +} + +func resourceMaintenanceWindowUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + client, diags := clients.NewApiClientFromSDKResource(d, meta) + if diags.HasError() { + return diags + } + + serverVersion, diags := client.ServerVersion(ctx) + if diags.HasError() { + return diags + } + + serverFlavor, diags := client.ServerFlavor(ctx) + if diags.HasError() { + return diags + } + + diags = validateMaintenanceWindowServer(serverVersion, serverFlavor) + if diags.HasError() { + return diags + } + + maintenanceWindow, diags := getMaintenanceWindowFromResourceData(d) + if diags.HasError() { + return diags + } + + compId, diags := clients.CompositeIdFromStr(d.Id()) + + if diags.HasError() { + return diags + } + + maintenanceWindow.MaintenanceWindowId = compId.ResourceId + + _, diags = kibana.UpdateMaintenanceWindow(ctx, client, maintenanceWindow) + + if diags.HasError() { + return diags + } + + return resourceMaintenanceWindowRead(ctx, d, meta) +} + +func resourceMaintenanceWindowRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + client, diags := clients.NewApiClientFromSDKResource(d, meta) + if diags.HasError() { + return diags + } + + serverVersion, diags := client.ServerVersion(ctx) + if diags.HasError() { + return diags + } + + serverFlavor, diags := client.ServerFlavor(ctx) + if diags.HasError() { + return diags + } + + diags = validateMaintenanceWindowServer(serverVersion, serverFlavor) + if diags.HasError() { + return diags + } + + compId, diags := clients.CompositeIdFromStr(d.Id()) + if diags.HasError() { + return diags + } + + id := compId.ResourceId + spaceId := compId.ClusterId + + maintenanceWindow, diags := kibana.GetMaintenanceWindow(ctx, client, id, spaceId) + + if maintenanceWindow == nil && diags == nil { + d.SetId("") + return diags + } + if diags.HasError() { + return diags + } + if err := d.Set("space_id", maintenanceWindow.SpaceId); err != nil { + return diag.FromErr(err) + } + if err := d.Set("title", maintenanceWindow.Title); err != nil { + return diag.FromErr(err) + } + if err := d.Set("enabled", maintenanceWindow.Enabled); err != nil { + return diag.FromErr(err) + } + + if maintenanceWindow.Scope != nil && maintenanceWindow.Scope.Alerting != nil { + alertingScope := []interface{}{} + alertingScope = append(alertingScope, map[string]interface{}{ + "kql": maintenanceWindow.Scope.Alerting.Kql, + }) + + scope := []interface{}{} + scope = append(scope, map[string]interface{}{ + "alerting": alertingScope, + }) + + if err := d.Set("scope", scope); err != nil { + return diag.FromErr(err) + } + } + + schedule := []interface{}{} + recurring := []interface{}{} + + if maintenanceWindow.CustomSchedule.Recurring != nil { + recurring = append(recurring, map[string]interface{}{ + "end": maintenanceWindow.CustomSchedule.Recurring.End, + "every": maintenanceWindow.CustomSchedule.Recurring.Every, + "on_week_day": maintenanceWindow.CustomSchedule.Recurring.OnWeekDay, + "on_month_day": maintenanceWindow.CustomSchedule.Recurring.OnMonthDay, + "on_month": maintenanceWindow.CustomSchedule.Recurring.OnMonth, + }) + } else { + recurring = nil + } + + schedule = append(schedule, map[string]interface{}{ + "start": maintenanceWindow.CustomSchedule.Start, + "duration": maintenanceWindow.CustomSchedule.Duration, + "timezone": maintenanceWindow.CustomSchedule.Timezone, + "recurring": recurring, + }) + + if err := d.Set("custom_schedule", schedule); err != nil { + return diag.FromErr(err) + } + + return diags +} + +func resourceMaintenanceWindowDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + client, diags := clients.NewApiClientFromSDKResource(d, meta) + if diags.HasError() { + return diags + } + + serverVersion, diags := client.ServerVersion(ctx) + if diags.HasError() { + return diags + } + + serverFlavor, diags := client.ServerFlavor(ctx) + if diags.HasError() { + return diags + } + + diags = validateMaintenanceWindowServer(serverVersion, serverFlavor) + if diags.HasError() { + return diags + } + + compId, diags := clients.CompositeIdFromStr(d.Id()) + if diags.HasError() { + return diags + } + + id := compId.ResourceId + spaceId := compId.ClusterId + + if diags = kibana.DeleteMaintenanceWindow(ctx, client, id, spaceId); diags.HasError() { + return diags + } + + d.SetId("") + return diags +} diff --git a/internal/kibana/maintenance_window_test.go b/internal/kibana/maintenance_window_test.go new file mode 100644 index 000000000..78cd43747 --- /dev/null +++ b/internal/kibana/maintenance_window_test.go @@ -0,0 +1,161 @@ +package kibana_test + +import ( + "context" + "fmt" + "testing" + + "github.com/elastic/terraform-provider-elasticstack/internal/acctest" + "github.com/elastic/terraform-provider-elasticstack/internal/clients" + "github.com/elastic/terraform-provider-elasticstack/internal/clients/kibana" + "github.com/elastic/terraform-provider-elasticstack/internal/versionutils" + "github.com/hashicorp/go-version" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" +) + +func CheckMinVersionAndServerless() (bool, error) { + minSupportedVersion := version.Must(version.NewSemver("9.1.0")) + versionIsUnsupported, err := versionutils.CheckIfVersionIsUnsupported(minSupportedVersion)() + if err != nil { + return false, err + } + + isServerless, err := versionutils.CheckIfServerless()() + if err != nil { + return false, err + } + + return versionIsUnsupported && !isServerless, err +} + +func TestAccResourceMaintenanceWindow(t *testing.T) { + t.Setenv("KIBANA_API_KEY", "") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceMaintenanceWindowDestroy, + ProtoV6ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: CheckMinVersionAndServerless, + Config: testAccResourceMaintenanceWindowCreate, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "title", "Terraform Maintenance Window"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "enabled", "true"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.start", "1992-01-01T05:00:00.200Z"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.duration", "10d"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.timezone", "UTC"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.recurring.0.every", "20d"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.recurring.0.end", "2029-05-17T05:05:00.000Z"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.recurring.0.on_week_day.0", "MO"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.recurring.0.on_week_day.1", "TU"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "scope.0.alerting.0.kql", "_id: '1234'"), + ), + }, + { + SkipFunc: CheckMinVersionAndServerless, + Config: testAccResourceMaintenanceWindowUpdate, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "title", "Terraform Maintenance Window UPDATED"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "enabled", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.start", "1999-02-02T05:00:00.200Z"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.duration", "12d"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.timezone", "Asia/Taipei"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.recurring.0.every", "21d"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.recurring.0.end", ""), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.recurring.0.on_month_day.0", "1"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.recurring.0.on_month_day.1", "2"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.recurring.0.on_month_day.2", "3"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.recurring.0.on_month.0", "4"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "custom_schedule.0.recurring.0.on_month.1", "5"), + resource.TestCheckResourceAttr("elasticstack_kibana_maintenance_window.test_maintenance_window", "scope.0.alerting.0.kql", "_id: 'foobar'"), + ), + }, + }, + }) +} + +const testAccResourceMaintenanceWindowCreate = ` +provider "elasticstack" { + elasticsearch {} + kibana {} +} + +resource "elasticstack_kibana_maintenance_window" "test_maintenance_window" { + title = "Terraform Maintenance Window" + enabled = true + custom_schedule { + start = "1992-01-01T05:00:00.200Z" + duration = "10d" + timezone = "UTC" + + recurring { + every = "20d" + end = "2029-05-17T05:05:00.000Z" + on_week_day = ["MO", "TU"] + } + } + + scope { + alerting { + kql = "_id: '1234'" + } + } +} +` + +const testAccResourceMaintenanceWindowUpdate = ` +provider "elasticstack" { + elasticsearch {} + kibana {} +} + +resource "elasticstack_kibana_maintenance_window" "test_maintenance_window" { + title = "Terraform Maintenance Window UPDATED" + enabled = false + custom_schedule { + start = "1999-02-02T05:00:00.200Z" + duration = "12d" + timezone = "Asia/Taipei" + + recurring { + every = "21d" + on_month_day = [1, 2, 3] + on_month = [4, 5] + } + } + + scope { + alerting { + kql = "_id: 'foobar'" + } + } +} +` + +func checkResourceMaintenanceWindowDestroy(s *terraform.State) error { + client, err := clients.NewAcceptanceTestingClient() + if err != nil { + return err + } + + for _, rs := range s.RootModule().Resources { + if rs.Type != "elasticstack_kibana_maintenance_window" { + continue + } + compId, _ := clients.CompositeIdFromStr(rs.Primary.ID) + + maintenanceWindow, diags := kibana.GetMaintenanceWindow(context.Background(), client, compId.ResourceId, compId.ClusterId) + + if diags.HasError() { + return fmt.Errorf("Failed to get maintenance window: %v", diags) + } + + if maintenanceWindow != nil { + return fmt.Errorf("Maintenance window (%s) still exists", compId.ResourceId) + } + } + + return nil +} diff --git a/internal/models/maintenance_window.go b/internal/models/maintenance_window.go new file mode 100644 index 000000000..a16bc9f33 --- /dev/null +++ b/internal/models/maintenance_window.go @@ -0,0 +1,33 @@ +package models + +type MaintenanceWindow struct { + MaintenanceWindowId string + SpaceId string + Title string + Enabled bool + Scope *MaintenanceWindowScope + CustomSchedule MaintenanceWindowSchedule +} + +type MaintenanceWindowScope struct { + Alerting *MaintenanceWindowAlertingScope +} + +type MaintenanceWindowAlertingScope struct { + Kql string +} + +type MaintenanceWindowSchedule struct { + Start string + Duration string + Timezone *string + Recurring *MaintenanceWindowScheduleRecurring +} + +type MaintenanceWindowScheduleRecurring struct { + End *string + Every *string + OnWeekDay *[]string + OnMonthDay *[]float32 + OnMonth *[]float32 +} diff --git a/internal/utils/validation.go b/internal/utils/validation.go index 379548dec..d61b3d420 100644 --- a/internal/utils/validation.go +++ b/internal/utils/validation.go @@ -4,6 +4,9 @@ import ( "fmt" "regexp" "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) // StringIsDuration is a SchemaValidateFunc which tests to make sure the supplied string is valid duration. @@ -60,3 +63,27 @@ func StringIsHours(i interface{}, k string) (warnings []string, errors []error) return nil, nil } + +// Avoid lint error on deprecated SchemaValidateFunc usage. +// +//nolint:staticcheck +func StringIsAlertingDuration() schema.SchemaValidateFunc { + r := regexp.MustCompile(`^[1-9][0-9]*(?:d|h|m|s)$`) + return validation.StringMatch(r, "string is not a valid Alerting duration in seconds (s), minutes (m), hours (h), or days (d)") +} + +// Avoid lint error on deprecated SchemaValidateFunc usage. +// +//nolint:staticcheck +func StringIsMaintenanceWindowOnWeekDay() schema.SchemaValidateFunc { + r := regexp.MustCompile(`^(((\+|-)[1-5])?(MO|TU|WE|TH|FR|SA|SU))$`) + return validation.StringMatch(r, "string is not a valid OnWeekDay. Accepted values are specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`).") +} + +// Avoid lint error on deprecated SchemaValidateFunc usage. +// +//nolint:staticcheck +func StringIsMaintenanceWindowIntervalFrequency() schema.SchemaValidateFunc { + r := regexp.MustCompile(`^[1-9][0-9]*(?:d|w|M|y)$`) + return validation.StringMatch(r, "string is not a valid interval/frequency. Allowed values are in the `` format. `` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.") +} diff --git a/internal/utils/validation_test.go b/internal/utils/validation_test.go index ef06bed5a..9ea1e51db 100644 --- a/internal/utils/validation_test.go +++ b/internal/utils/validation_test.go @@ -93,3 +93,204 @@ func TestStringIsElasticDuration(t *testing.T) { }) } } + +func TestStringIsAlertingDuration(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + i interface{} + k string + wantWarnings []string + wantErrors []error + }{ + { + name: "valid Alerting duration string (30d)", + i: "30d", + k: "duration", + }, + { + name: "invalid Alerting duration unit (0s)", + i: "0s", + k: "duration", + wantErrors: []error{errors.New(`invalid value for duration (string is not a valid Alerting duration in seconds (s), minutes (m), hours (h), or days (d))`)}, + }, + { + name: "invalid Alerting duration value (.12y)", + i: ".12y", + k: "duration", + wantErrors: []error{errors.New(`invalid value for duration (string is not a valid Alerting duration in seconds (s), minutes (m), hours (h), or days (d))`)}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + gotWarnings, gotErrors := StringIsAlertingDuration()(tt.i, tt.k) + if !reflect.DeepEqual(gotWarnings, tt.wantWarnings) { + t.Errorf("StringIsAlertingDuration() gotWarnings = %v, want %v", gotWarnings, tt.wantWarnings) + } + if !reflect.DeepEqual(gotErrors, tt.wantErrors) { + t.Errorf("StringIsAlertingDuration() gotErrors = %v, want %v", gotErrors, tt.wantErrors) + } + }) + } +} + +func TestStringIsMaintenanceWindowOnWeekDay(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + i interface{} + k string + wantWarnings []string + wantErrors []error + }{ + { + name: "valid on_week_day string (+1MO)", + i: "+1MO", + k: "on_week_day", + }, + { + name: "valid on_week_day string (+2TU)", + i: "+2TU", + k: "on_week_day", + }, + { + name: "valid on_week_day string (+3WE)", + i: "+3WE", + k: "on_week_day", + }, + { + name: "valid on_week_day string (+4TH)", + i: "+4TH", + k: "on_week_day", + }, + { + name: "valid on_week_day string (+5FR)", + i: "+5FR", + k: "on_week_day", + }, + { + name: "valid on_week_day string (-5SA)", + i: "-5SA", + k: "on_week_day", + }, + { + name: "valid on_week_day string (-4SU)", + i: "-4SU", + k: "on_week_day", + }, + { + name: "valid on_week_day string (-3MO)", + i: "-3MO", + k: "on_week_day", + }, + { + name: "valid on_week_day string (-2TU)", + i: "-2TU", + k: "on_week_day", + }, + { + name: "valid on_week_day string (-1WE)", + i: "-1WE", + k: "on_week_day", + }, + { + name: "invalid on_week_day unit (FOOBAR)", + i: "FOOBAR", + k: "on_week_day", + wantErrors: []error{errors.New("invalid value for on_week_day (string is not a valid OnWeekDay. Accepted values are specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`).)")}, + }, + { + name: "invalid on_week_day string (+9MO)", + i: "+9MO", + k: "on_week_day", + wantErrors: []error{errors.New("invalid value for on_week_day (string is not a valid OnWeekDay. Accepted values are specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`).)")}, + }, + { + name: "invalid on_week_day string (-7FR)", + i: "-7FR", + k: "on_week_day", + wantErrors: []error{errors.New("invalid value for on_week_day (string is not a valid OnWeekDay. Accepted values are specific days of the week (`[MO,TU,WE,TH,FR,SA,SU]`) or nth day of month (`[+1MO, -3FR, +2WE, -4SA, -5SU]`).)")}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + gotWarnings, gotErrors := StringIsMaintenanceWindowOnWeekDay()(tt.i, tt.k) + if !reflect.DeepEqual(gotWarnings, tt.wantWarnings) { + t.Errorf("StringIsMaintenanceWindowOnWeekDay() gotWarnings = %v, want %v", gotWarnings, tt.wantWarnings) + } + if !reflect.DeepEqual(gotErrors, tt.wantErrors) { + t.Errorf("StringIsMaintenanceWindowOnWeekDay() gotErrors = %v, want %v", gotErrors, tt.wantErrors) + } + }) + } +} + +func TestStringIsMaintenanceWindowIntervalFrequency(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + i interface{} + k string + wantWarnings []string + wantErrors []error + }{ + { + name: "valid interval/frequency string (2d)", + i: "2d", + k: "every", + }, + { + name: "valid interval/frequency string (5w)", + i: "5w", + k: "every", + }, + { + name: "valid interval/frequency string (3M)", + i: "3M", + k: "every", + }, + { + name: "valid interval/frequency string (1y)", + i: "1y", + k: "every", + }, + { + name: "invalid interval/frequency string (5m)", + i: "5m", + k: "every", + wantErrors: []error{errors.New("invalid value for every (string is not a valid interval/frequency. Allowed values are in the `` format. `` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.)")}, + }, + { + name: "invalid interval/frequency string (-1w)", + i: "-1w", + k: "every", + wantErrors: []error{errors.New("invalid value for every (string is not a valid interval/frequency. Allowed values are in the `` format. `` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.)")}, + }, + { + name: "invalid interval/frequency string (invalid)", + i: "invalid", + k: "every", + wantErrors: []error{errors.New("invalid value for every (string is not a valid interval/frequency. Allowed values are in the `` format. `` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.)")}, + }, + { + name: "invalid interval/frequency empty string", + i: " ", + k: "every", + wantErrors: []error{errors.New("invalid value for every (string is not a valid interval/frequency. Allowed values are in the `` format. `` is one of `d`, `w`, `M`, or `y` for days, weeks, months, years. For example: `15d`, `2w`, `3m`, `1y`.)")}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + gotWarnings, gotErrors := StringIsMaintenanceWindowIntervalFrequency()(tt.i, tt.k) + if !reflect.DeepEqual(gotWarnings, tt.wantWarnings) { + t.Errorf("StringIsMaintenanceWindowIntervalFrequency() gotWarnings = %v, want %v", gotWarnings, tt.wantWarnings) + } + if !reflect.DeepEqual(gotErrors, tt.wantErrors) { + t.Errorf("StringIsMaintenanceWindowIntervalFrequency() gotErrors = %v, want %v", gotErrors, tt.wantErrors) + } + }) + } +} diff --git a/internal/versionutils/testutils.go b/internal/versionutils/testutils.go index 22167dc6d..f94f1bc44 100644 --- a/internal/versionutils/testutils.go +++ b/internal/versionutils/testutils.go @@ -23,6 +23,22 @@ func CheckIfVersionIsUnsupported(minSupportedVersion *version.Version) func() (b } } +func CheckIfServerless() func() (bool, error) { + return func() (b bool, err error) { + serverlessFlavor := "serverless" + client, err := clients.NewAcceptanceTestingClient() + if err != nil { + return false, err + } + serverFlavor, diags := client.ServerFlavor(context.Background()) + if diags.HasError() { + return false, fmt.Errorf("failed to parse the elasticsearch server flavor %v", diags) + } + + return serverFlavor == serverlessFlavor, nil + } +} + func CheckIfVersionMeetsConstraints(constraints version.Constraints) func() (bool, error) { return func() (b bool, err error) { client, err := clients.NewAcceptanceTestingClient() diff --git a/provider/provider.go b/provider/provider.go index 105ee5067..32154cc8d 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -101,11 +101,12 @@ func New(version string) *schema.Provider { "elasticstack_elasticsearch_transform": transform.ResourceTransform(), "elasticstack_elasticsearch_watch": watcher.ResourceWatch(), - "elasticstack_kibana_alerting_rule": kibana.ResourceAlertingRule(), - "elasticstack_kibana_space": kibana.ResourceSpace(), - "elasticstack_kibana_action_connector": kibana.ResourceActionConnector(), - "elasticstack_kibana_security_role": kibana.ResourceRole(), - "elasticstack_kibana_slo": kibana.ResourceSlo(), + "elasticstack_kibana_alerting_rule": kibana.ResourceAlertingRule(), + "elasticstack_kibana_space": kibana.ResourceSpace(), + "elasticstack_kibana_action_connector": kibana.ResourceActionConnector(), + "elasticstack_kibana_security_role": kibana.ResourceRole(), + "elasticstack_kibana_slo": kibana.ResourceSlo(), + "elasticstack_kibana_maintenance_window": kibana.ResourceMaintenanceWindow(), }, }